World leaders have paid tribute to Fidel Castro, the Cuban revolutionary leader who built a communist state on the doorstep of the United States.
But in death just as in life he divided opinion and critics have labelled him a "tyrant".
Castro died on Friday aged 90, his younger brother and successor Raul Castro announced on state television.
Mikhail Gorbachev, the final leader of the Soviet Union which had long acted as an economic and political prop for Cuba, said Castro left a lasting mark on his country and on world history.
"Fidel held his ground and strengthened his country at the time of the harshest American blockade, at the time of massive pressure on him," Gorbachev was quoted by Interfax news agency as saying.
"Nevertheless he led out his country from the blockade to the path of self-sustained and independent development."
In a telegram of condolence to Raul Castro, Russian President Vladimir Putin called the late leader an "inspiring example for many countries".
"Fidel Castro was a frank and tried and true friend of Russia," the Kremlin quoted the message as saying.
In Venezuela, a long-time ally of Cuba and staunch opponent of the political stance of the United States, President Nicolas Maduro said Castro had inspired and would continue to inspire his country.
"We will keep on winning and keep fighting. Fidel Castro is an example of the fight for all the people of the world. We will go forward with his legacy," Maduro told television station Telesur.
Ecuadorean President Rafael Correa said: "A great has left us. Fidel has died. Long live Cuba! Long live Latin America!"
South African President Jacob Zuma thanked the Cuban leader for his help and support in the struggle to overthrow apartheid.
"President Castro identified with our struggle against apartheid. He inspired the Cuban people to join us in our own struggle against apartheid," he said.
French President Francois Hollande mourned the loss of a major figure and welcomed the rapprochement between Havana and Washington, while noting concerns over human rights under Castro.
"Fidel Castro was a towering figure of the 20th century. He incarnated the Cuban revolution, in both its hopes and subsequent disillusionments," Hollande said in a statement.
"France, which condemned human rights abuses in Cuba, had equally challenged the US embargo on Cuba and France was glad to see the two countries re-establish dialogue and open ties between themselves," added the Socialist party leader.
Hollande met Fidel Castro in May, 2015 during the first ever visit by a French head of state to Cuba since the Cuban revolution.
In contrast, the reaction from some Cubans living in the United States was scathing and celebratory.
US Congress representative Ileana Ros-Lehtinen, a Cuban-American Republican from Miami, said in a statement: "A tyrant is dead and a new beginning can dawn on the last remaining communist bastion of the Western Hemisphere."
In Miami, in the area surrounding the Versailles Restaurant where many exiles who fled the Cuban revolution live, people took to the streets in their cars in the early hours of Saturday morning to celebrate Castro's death.