Raul Castro announces he will stand down in five years as he is joined by his elder brother, Fidel, in a rare public appearance.

The 81-year-old announced his retirement shortly after he was re-elected to a second five-year term.

The new parliament also named 52-year-old rising star Miguel Diaz-Canel as first vice president – effectively Mr Castro’s successor if he fails to serve out his final full term in office.

Former President Fidel Castro joined the National Assembly meeting on Sunday in a rare public appearance.

Since falling ill in 2006 and ceding the presidency to his brother, the elder Castro, 86, has given up official positions except as a deputy in the National Assembly.

The new Government will almost certainly be the last to be spearheaded by the Castro brothers and their generation of leaders who have ruled Cuba since the 1959 revolution.

“This will be my last term,” Raul Castro told the legislative gathering.

He said Cuba was at a moment of “historic transcendence”, and that Mr Diaz-Canel’s promotion represented “a definitive step in the configuration of the future leadership of the nation through the gradual and orderly transfer of key roles to new generations”.

However, he dismissed any idea of the country abandoning socialism.

“Our greatest satisfaction is the tranquility and serene confidence we feel as we deliver to the new generations the responsibility to continue building socialism,” he added.

While the country remains under Communist Party rule, since taking over from Fidel in 2006 the younger Castro has instituted a slate of important economic and social changes including expanding private enterprise, encouraging farming, minor manufacturing and retail and relaxing hated travel restrictions.

The party plan also includes an opening to more foreign investment.

The pledge of a change at the top could also have deep significance for US-Cuba ties.

The wording of Washington’s 51-year economic embargo on the island specifies that it cannot be lifted while a Castro is in charge.