Havana, Cuba (CNN) -- Cuba's Communist Party elected President Raul Castro on Tuesday to succeed his older brother Fidel Castro as head of the country's highest political body and only legal party.
On the last day of the crucial party congress that approved sweeping economic changes, 84-year-old Fidel Castro made an unannounced appearance.
The two brothers, who have rarely appeared together since Fidel Castro fell ill in 2006 and handed power to his 79-year-old brother, grabbed hands at the end of the closing ceremony, sending a strong message of unity.
The delegates also selected one of Raul Castro's closest allies, Jose Ramon Machado Ventura, 80, to the No. 2 position.
That move could come as a disappointment to some who had hoped Raul Castro would follow through on his call for a rejuvenation of top posts.
When Raul Castro was officially elected president in 2008, he backed Machado Ventura to succeed him as the first vice president of the government.
The octogenarian's revolutionary activities date to 1952, when he was a medical student at the University of Havana, according to a government website. He fought alongside Fidel Castro in the Sierra Maestra mountains and has held a variety of posts, including minister of public health, and has been a member of the party's central committee. He has been a deputy of the National Assembly since 1976.
Raul Castro had said at the congress -- the first in 14 years -- that it was time for a "systematic rejuvenation of the whole chain of party and administrative posts," including the president of the party and of the Council of Ministers.
He proposed in his opening address that term limits be set for holders of public office. "We have arrived at the conclusion that it is advisable to limit the fundamental political and state offices to a maximum period of two consecutive periods of five years," Castro said Saturday at the inauguration of a critical Communist Party meeting.
He was officially elected in 2008.
But he also said Cuba's leadership had failed to prepare a younger generation to take over, leaving the country without "a reserve of substitutes who were adequately prepared."
Last month, Fidel Castro took Cubans by surprise when he announced that he had resigned as first secretary of the Communist Party five years earlier and had no intention of resuming the post.
Even as the congress began, on the party's Web page, Fidel Castro was listed as first secretary.
The congress approved more than 300 economic and political proposals made by Raul Castro, including massive layoffs in the public sector and an expansion of the private sector to soak up some of the unemployed.
The delegates also approved changes under which Cubans would be able to buy and sell homes and cars for the first time in decades but would see their ration books gradually eliminated.
During the closing session, Raul Castro sat next to his ailing brother, who had taken halting steps to reach his chair.
"Fidel, what a pleasure to have you here," said Julio Camacho Aguilera, a member of the Central Committee, to applause from delegates at the Palace of Conventions here. "Although you never left -- you will always be in the hearts of all Cubans."
But the elder Castro, known for his lengthy speeches, did not take a turn at the microphone.
"He's being eased to the sidelines," said Professor Bruce Bagley, said chairman of the Department of International Studies at the University of Miami in Florida. "Raul is the heir apparent and is consolidating his power and bringing in people around him with whom he has some confidence and some degree of trust, so the transition to the next generation is glacially slow. And that's what the Sixth Party Congress is reflecting."