"The ceremony began with the national anthem. Before that we saw some of the dignitaries, like Evo Morales of Bolivia and Jacob Zuma of South Africa, take their seats on the podium. They were cheered, applauded by everyone in the crowd."

Cubans divided over Fidel Castro's legacy

Leftist presidents Nicolas Maduro of Venezuela, Ecuador's President Rafael Correa and Daniel Ortega of Nicaragua were also among foreign dignitaries to pay tribute to Castro.

Correa praised Castro's ideology, telling the crowd: "We will keep fighting for these ideas. We swear!"

Zimbabwe's Robert Mugabe, 92, himself a former Marxist guerrilla who has led his country as prime minister or president since 1980 despite financial and health crises, praised Fidel Castro's government for having trained thousands of Zimbabwean doctors and teachers.

"Fidel was not just your leader. He was our leader and the leader of all revolutionaries. We followed him, listened to him and tried to emulate him," Mugabe told reporters as he arrived in Havana.

South African President Jacob Zuma hailed Castro as "one of the great heroes of the 20th century", citing his opposition to apartheid and his deployment of Cuban troops to back Angola's government against rebels in 1975.

Mexico's Enrique Pena Nieto also flew in, but Colombian Juan Manuel Santos, whose government negotiated a peace deal with the Marxist FARC rebels in Havana, did not come as expected.

Thousands of Cubans attended the ceremony in the capital, Havana [Edgard Garrido/Reuters]

Representatives and supporters of revolutionary groups from around the world also attended the ceremony in Havana.

"In the crowd I have seen flags from the Basque country in Spain, also a Sinn Fein flag from Ireland ... groups that would have gained support of Fidel for their so-called revolutionary ideals were also present," said Al Jazeera's Fisher.

Greek Prime Minister Alexis Tsipras was the only European leader at the rally.

The leaders of Britain, Germany, France, Spain and Canada all sent others to represent them.

US President Barack Obama, who along with Raul Castro ended decades of enmity to restore diplomatic relations, did not attend. Obama's senior advisor Ben Rhodes and the top US diplomat in Cuba, Jeffrey DeLaurentis, represented Washington, but without the status of a "presidential delegation".

"We continue to have some significant concerns about the way the Cuban government currently operates, particularly with regard to protecting the basic human rights of the Cuban people," White House spokesman Josh Earnest said.

Several other world leaders also shunned the tribute, highlighting the divisive legacy of the major Cold War player. Even the presidents of nations who are friendly with Cuba, such as Russia, China and Iran, sent deputies instead of attending themselves.

China sent Vice President Li Yuanchao, while Chinese President Xi Jinping visited the Cuban embassy in Beijing to pay his condolences, the country's foreign ministry said.

Russian President Vladimir Putin skipped the ceremony but described Castro as a "true friend of Russia".

The Kremlin said he held a different view on his legacy to that of US president-elect Donald Trump, who has called the Cuban leader "a brutal dictator".

Mexicans pay tribute to Fidel Castro

"Cubans are very aware that the likes of Jacob Zuma and Robert Mugaba, who is 92, have made the effort to come here," said Al Jazeera's Fisher.

"But Americans have sent a national security adviser and their newly minted ambassador as their delegation. The British have sent a junior foreign minister to the event. But the people in Cuba aren't that bothered. What really matters to them is that they themselves mark the life of Fidel Castro."

The Cuban government, still essentially dedicated to Castro's political vision despite some economic reforms under Raul Castro, has declared nine days of mourning. That included a two-day commemoration in Havana, where tens of thousands of Cubans have waited in long lines to pay their respects in Revolution Square.

Castro - who ruled from 1959 until an illness forced him to hand power to his brother Raul in 2006 - died on Friday at age 90. The cause of death has not been announced.

"Fidel would be proud to see the square overflowing like this, especially with young people," said 46-year-old teacher Tatiana Gonzalez.

The rally followed two days during which Cubans, encouraged by the government, streamed past a picture of Castro inside the square's towering monument to independence hero Jose Marti.

They were also urged to sign an oath of loyalty to Castro's revolution in books placed at schools and other public buildings.

After Tuesday's ceremony, the urn holding Castro's ashes will be taken on a "caravan of freedom" across the country, retracing the route his guerrilla movement took to celebrate the toppling of dictator Fulgencio Batista in 1959.

The commemorations end on Sunday, when the urn will be laid to rest in the eastern city of Santiago de Cuba, where 19th-century independence hero Marti is buried.