(BBC) Cuba’s former leader Fidel Castro was a “brutal dictator”, US President-elect Donald Trump has said, hours after the 90-year-old’s death was announced.
Mr Trump, who takes office in January, said he hoped Cubans could move towards a freer future.
Castro came to power in 1959 and ushered in a Communist revolution. He defied the US for decades, surviving many assassination plots.
Supporters said he returned Cuba to the people. Critics called him a dictator.
His brother Raul, who succeeded him as president, announced his death on state television on Friday night.
In a statement, Mr Trump said that while Cuba remained “a totalitarian island, it is my hope that today marks a move away from the horrors endured for too long, and toward a future in which the wonderful Cuban people finally live in the freedom they so richly deserve”.
The US cut ties with Cuba in 1961 amid rising Cold War tensions and imposed a strict economic embargo which remains in place more than half a century on.
Under Barack Obama, the relationship warmed and diplomatic ties were restored in 2015.
Mr Trump roundly criticised Mr Obama’s policy on the campaign trail but made no mention of his pledge to reverse it in his statement, saying his administration would do all it could to ensure Cubans could “begin their journey toward prosperity and liberty”.
Mr Obama, meanwhile, said history would “record and judge the enormous impact” of Castro. America was extending “a hand of friendship to the Cuban people” at this time, he added.
Castro was the longest serving non-royal leader of the 20th Century. He had been retired from political life for several years, after handing power to his brother in 2006 because of illness.
He will be cremated later on Saturday at a private ceremony in Havana and a period of official mourning has been declared on the island until 4 December, when his ashes will be laid to rest in the south-eastern city of Santiago.
News of his death left some in Havana stunned. “I always said it couldn’t be,” said one woman, a government employee. “Even though they said it now, I say it can’t be.”
But Cuban dissident group Ladies in White, which was founded by wives of jailed dissidents, tweeted: “May God forgive him, I won’t”.
In Miami, where there is a large Cuban community, there have been celebrations in some parts of the city, with people banging pots and cheering.
What now for US-Cuba relations? Aleem Maqbool, BBC News, Washington
So much of Fidel Castro’s legacy is defined by the relationship of the US with the Cuba that he controlled. But given his withdrawal into the background in recent years, what impact will his passing really have in that regard?
It was the Obama philosophy that more influence could be exerted on Cuba by being more of a friend to the regime than through isolation.
While he had said differently in the past, as a presidential candidate Donald Trump became more and more hard-line, even talking of reversing the decisions made by Barack Obama on Cuba, such that many of the Cuban-Americans who took to the streets of Miami to celebrate Castro’s death even carried “Trump” signs.
In a sense though, Castro’s death gives Mr Trump room for manoeuvre in his tough stance towards the Cuban regime to make more progress, particularly in the economic relationship between the two countries.
The same Cuban-Americans praising him now will be watching closely to see if he keeps to his promise of demanding real reform in Cuba before adhering to the commitments made by his predecessor.
How Castro defied the US
Throughout the Cold War, Fidel Castro was a thorn in Washington’s side.
An accomplished tactician on the battlefield, he and his small army of guerrillas overthrew the military leader Fulgencio Batista in 1959 to widespread popular support.
Within two years of taking power, he declared the revolution to be Marxist-Leninist in nature and allied Cuba firmly to the Soviet Union – a move that led to the missile crisis in 1962, bringing the world to the brink of nuclear war before the Soviet Union abandoned its plan to put missiles on Cuban soil.
Despite the constant threat of a US invasion as well as the long-standing economic embargo on the island, Castro managed to maintain a communist revolution in a nation just 90 miles (145km) off the coast of Florida.
Despised by his critics as much as he was revered by his followers, he maintained his rule through 10 US presidents and survived scores of attempts on his life by the CIA.
He established a one-party state, with hundreds of supporters of the Batista government executed. Political opponents have been imprisoned, the independent media suppressed. Thousands of Cubans have fled into exile.
How has the world reacted?
Many world leaders have paid tribute to Castro. Russian President Vladimir Putin described him as a “reliable and sincere friend” of Russia, while Chinese President Xi Jinping said his people had “lost a good and true comrade”.
The Soviet Union’s last leader, Mikhail Gorbachev, said: “Fidel stood up and strengthened his country during the harshest American blockade, when there was colossal pressure on him.”
UN Secretary General Ban Ki-moon acknowledged advances in education, literary and health under Castro, but said he hoped Cuba would “continue to advance on a path of reform, greater prosperity and human rights”.
Pope Francis, who met Castro, an atheist, when he visited Cuba in 2015, called his death “sad news”.
In Venezuela, Cuba’s main regional ally, President Nicolas Maduro said “revolutionaries of the world must follow his legacy”.