They chanted "long live the revolution!" and "Fidel! Fidel!" at a packed Revolution Square, the vast esplanade where he gave so many of his legendary, marathon speeches.
A giant picture of a young, bearded Castro in his guerrilla uniform and rifle hung on the National Library as his brother and successor, Raul Castro, waved at the crowd.
Ecuador's leftist President Rafael Correa praised Castro's ideology, telling the crowd: "We will keep fighting for these ideas. We swear!"
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.
But several world leaders shunned the tribute, highlighting the divisive legacy of the major Cold War player. Even the presidents of friendly nations such as Russia, China and Iran sent deputies.
Castro — who ruled from 1959 until an illness forced him to hand power to his brother Raul in 2006 — died on Friday at the age of 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 Sunday, when the urn is laid to rest in the eastern city of Santiago de Cuba, where 19th century independence hero Marti is buried.
Leftist presidents Nicolas Maduro of Venezuela, Evo Morales of Bolivia and Daniel Ortega of Nicaragua — spiritual sons of Castro's revolution — were among the most notable foreign dignitaries to pay tribute to Castro.
Venezuela long has shipped cut-rate oil to ally Cuba, which cannot get credit on international markets. This critical support from Havana's main regional ally enabled Cuba's economy to stay afloat, if barely, for more than a decade, analysts say.