Fidel Castro has not been seen in public since his operation in July

Castro's career

The 81-year-old handed over power temporarily to his brother Raul in July 2006 when he underwent surgery and has not been seen in public since then.

Cuba's new parliament will meet on Sunday to elect a new president.

Washington has called for Cuba to hold free elections, and said its decades-long embargo would remain.

This should be a period of democratic transition for the people of Cuba

US President George W Bush

Reaction in quotes Cold War to thaw? Send us your reaction

President George W Bush said the US was ready to help the "people of Cuba realise the blessings of liberty".

A senior US state department official, John Negroponte, added that the 1962 embargo would probably not be lifted "any time soon".

The European Union said it hoped to relaunch ties with Cuba that were almost completely frozen under Mr Castro, while China described Mr Castro as an old friend and said it would maintain co-operation with Cuba.

Mr Castro has ruled Cuba since leading a revolution in 1959.

The BBC's Michael Voss reports from Havana that most Cubans will be saddened by news of their leader's retirement, but many hope the political transition will bring economic improvements.

Soldiering on

Mr Castro made his announcement in a letter published on the website of the Cuban Communist Party's newspaper Granma in the middle of the night, Cuban time.

He said he would not accept another five-year term as president when the National Assembly met on Sunday.

"It would betray my conscience to take up a responsibility that requires mobility and total devotion, that I am not in a physical condition to offer," he wrote.

Mr Castro said he had not stepped down after undergoing emergency intestinal surgery in 2006 because he had had a duty to the Cuban people to prepare them for his absence.

But retirement, he added, would not stop him from carrying "on fighting like a soldier of ideas", and he promised to continue writing essays entitled Reflections of Comrade Fidel.

"I will be one more weapon in the arsenal that you can count on," he said.

Search for new leader

The National Assembly is widely expected to elect Raul Castro, 76, as Fidel's successor.

FIDEL CASTRO Born in 1926 to a wealthy, landowning family Took up arms in 1953, six years before coming to power Brother Raul was deputy and Che Guevara third in command Has outlasted nine American presidents Target of many CIA assassination plots Daughter is a dissident exile in Miami

Castro's life in pictures

He has mooted major economic reforms and "structural changes".

But some analysts see a possible generational jump, with Vice-President Carlos Lage Davila, 56, a leading contender.

Anyone hoping that Fidel Castro's departure from the political scene would bring about the end of the communist regime was disappointed, the BBC's Nick Miles reports.

Whilst Cuban exiles celebrated in Miami, Florida, there were no protests on the streets of Havana calling for political change.

In part, our reporter says, this is because the regime does not tolerate dissent - but it is also because many in Cuba are wary of what change will probably mean: a mass influx of exiles returning from Miami.

Raul Castro has worked to ensure a smooth political transition, keeping the army loyal to the regime and strengthening the Communist Party's hold by introducing reforms and weeding out corrupt officials.

He has also had the advantage of continued economic support from Venezuelan President Hugo Chavez in the form of millions of barrels of cheap oil, our reporter adds.

Mixed legacy

It is not clear whether Mr Castro's retirement was prompted by a further decline in his health - the state of which is an official secret.

Though Fidel Castro has not been seen in public for 19 months, the government occasionally releases photographs and pre-edited video of him meeting visiting leaders from around the world.

The retiring leader will be remembered as one of the most distinctive and enduring icons from the second half of the 20th Century, the BBC's Paul Keller writes.

With his olive green fatigues, beard and Cuban cigars, Fidel Castro was the original Cold Warrior.

Under his leadership Cuba established the first Marxist-Leninist state in the Western hemisphere, almost within sight of the US coastline.

Embracing communism and the patronage of the Soviet Union, Fidel Castro transformed Cuba economically and socially but had to struggle when it collapsed.

He leaves his country with universal free healthcare and a much-admired education system, which has produced doctors for the developing world, but also a failing economy.