Cuban President Raul Castro said he planned to retire in 2018, when his current five-year term ends.

The 81-year-old Castro was re-elected to another term over the weekend by the Cuban National Assembly.

The assembly also elected 52-year-old Miguel Diaz-Canel to be the communist-ruled island's first vice president.

National Assembly members took up a measure backed by Castro that would impose a two-term limit on political posts and set mandatory retirement ages.

Diaz-Canel's election as the government's No. 2 man was a significant move.

He replaces Jose Ramon Machado Ventura, who fought with the Castro brothers in the Cuban Revolution, as first vice president of the Council of State and the Council of Ministers.

"We must guarantee executive unity at the top of state and government power in the face of any contingency over the loss of the top leader, so that the continuity and stability of the nation can be preserved without any interruption of any kind," Castro said.

Former President Fidel Castro, who has made only sporadic public appearances since leaving power in 2006 due to a serious illness, attended Sunday's National Assembly meeting.

The 86-year-old Fidel had not attended an assembly meeting since August 2010, when he delivered an address on the dangers of nuclear war at a special session.

Fidel Castro is a National Assembly member representing Santiago de Cuba. EFE