President Fidel Castro has made a rare visit to the Catholic cathedral in Cuba's capital Havana to attend a funeral Mass for Pope John Paul II.
Mr Castro said the Pope had earned the affection of the Cuban people
He praised the Pontiff as a "tireless fighter for friendship among peoples" and a friend of the poor.
He said the Pope would be remembered by Cubans for speaking out against the US trade embargo of the island.
Cuba, which was officially atheist until 1992, has begun three days of national mourning.
Wearing a dark suit instead of his usual military uniform, Mr Castro was accompanied by members of Cuba's ruling Communist Party.
It was one of his first visits to the cathedral in decades, said Church officials.
Thousands of mourners filled the cathedral and the adjoining square to follow the service led by Cuba's most senior prelate, Cardinal Jaime Ortega.
Correspondents say Cuba's communist-led government surprised some by encouraging the population to reflect on the life of John Paul II.
"Rest in peace, tireless fighter for friendship among peoples, enemy of war and friend of the poor," Mr Castro wrote in the condolences book at the Vatican's mission in Havana.
"Your departure pains us, unforgettable friend, and we fervently wish your example is lasting," he wrote.
Mr Castro said John Paul would be remembered for taking a stand against the US blockade of Cuba during a visit in 1998.
"This earned you the gratitude and the affection of all Cubans forever," he said.
Cuba's National Assembly President Ricardo Alarcon will head his country's delegation to the Papal funeral at the Vatican on Friday.