Fidel Castro made a rare public appearance on Saturday at his 90th birthday gala, after the leader of the 1959 revolution thanked fellow Cubans for their well wishes and lambasted his old foe the U.S. in a column carried by state-run media.

Cuba went into overdrive this month honouring the retired "El Comandante," who built a Communist-run state on the doorstep of the U.S., surviving what it says were hundreds of assassination attempts along the way.

Thousands danced to Latin beats along Havana's curving seafront Malecon boulevard throughout the night from Friday to Saturday.

At the giant street party, a live band played Happy Birthday on the stroke of midnight and fireworks exploded on the other side of the bay.

The leftist revolutionary, who handed over power in 2008 to his younger brother Raul due to ill health, appeared later in the day for a birthday gala featuring children's theatre, live music and videos from his life.

Seated in the front row of the Karl Marx theatre, he was flanked by Raul and regional ally Venezuelan President Nicolas Maduro. Increasingly frail, Castro had last made an official appearance at the Communist Party Congress in April.

"I want to express my most profound gratitude for the shows of respect, the greetings and gifts I have received the days, which give me the strength to reciprocate through ideas," Castro wrote in the opinion piece.

Castro slams Barack Obama

Castro went on to reminisce about his youth on the family plantation in the eastern village of Biran, in particular about his father who died before the revolution.

"He suffered quite a bit," Castro wrote. "Of his three male children, the second and third were absent and distant, both fulfilling their duty in revolutionary activities."

Even then, Fidel wrote, he knew Raul should replace him if anything should happen to him, in particular if the U.S. succeeded in its attempts to kill him.

"I almost laughed about the Machiavellian plans of the U.S. presidents," he wrote.

Thousands danced to Latin beats along Havana's curving seafront Malecon boulevard throughout the night from Friday to Saturday for Fidel Castro's 90th birthday gala. (Alexandre Meneghini/Reuters)

True to form, Castro went on to blast Barack Obama, this time for the U.S. president's speech in May when he visited Hiroshima, site of the world's first atomic bombing at the end of the Second World War.

"He lacked the words to ask for forgiveness for the killings of hundreds of thousands of people," Castro wrote.

In his last opinion piece, in March, the "Historic Leader" accused Obama of sweet-talking the Cuban people during his visit to the island, the first by a sitting U.S. leader in 88 years, and of ignoring the accomplishments of Communist rule.

Fidel's legacy mixed among Cubans

Many Cubans feel Fidel is no longer in step with the times.

Raul's most broadly feted accomplishment since taking power has been implementing a detente with the United States after a half century of confrontation.

Considered more pragmatic, the younger Castro also introduced market-style reforms to the state-dominated economy and increased personal freedoms, such as the right to travel abroad. Fidel has lent these policies only lukewarm support in public.

Many Cubans still revere Fidel for freeing Cuba from U.S. domination and introducing universal, free health care and education.

"Fidel is the best thing that happened to our country," said Aldo Zamora, 40, selling candy-coloured balloon animals at the street party along the Malecon, as a tropical electric storm lit up the night sky.