Fidel Castro has said he never expected to see his 87th birthday after serious illness forced him from office in 2006.

Castro, who turned 87 on Tuesday, has written about being struck down by a near-fatal intestinal ailment in 2006 in an essay carried by official media.

The essay was published over three pages of the Communist Party newspaper Granma.

"As soon as I understood that it would be definitive I did not hesitate to cease my charges as president," Mr Castro wrote.