Within half an hour of the Cuban government's announcement of the death of the 90-year-old revolutionary leader, cheers were heard in Miami's Little Havana. Thousands of people banged pots, waved Cuban flags and whooped in jubilation. "Cuba si! Castro no!" they chanted, while others screamed "Cuba libre!"

"Feels weird," said Gabriel Morales, a 40-year-old financial executive in Miami, whose parents left Cuba after Castro came to power. "Been waiting to hear this news all my life. Seems unreal," Morales said in a text message to an AP reporter.

People celebrate after the announcement of the death of Cuban revolutionary leader Fidel Castro in the Little Havana district of Miami. (Javier Galeano/Reuters)

Cubans in Miami dance in the street upon learning of Castro's death. (Gaston De Cardenas/Reuters)

People stand in the street after Havana's nightclubs were closed by authorities following the announcement of Fidel Castro's death. (Desmond Boylan/Associated Press)

"This is the happiest day of my life; Cubans are finally free," said Orlidia Montells, an 84-year-old woman.

U.S. 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."

History will judge Castro: Obama

U.S. President Barack Obama offered condolences to Castro's family and said his thoughts and prayers are with the Cuban people.

As for Castro's legacy, he said "history will record and judge the enormous impact of this singular figure on the people and world around him."

"The whole word will remember this man," said reveler Duncy Fajardo near the iconic National Hotel that hosted Ernest Hemingway and Frank Sinatra — and even known mobsters — before Castro's 1959 revolution led to its nationalization. "He achieved things that nobody else did."

A woman places flowers on a fence as part a tribute outside the Cuban Embassy in Mexico. (Henry Romero/Reuters)

Eliecer Avila, leader of the dissident group Somos Mas, watched state television broadcast a parade of archive images of Castro meeting with other world leaders and engaging in wholesome activities like harvesting sugar cane.

"I think this is the first step to a great change. I think that some were waiting for today with joy," Avila said.

'Fidel Castro is a father figure in Cuba, loved across the board by many people here,' says Radio Havana journalist Juan Jacomino 2:14

Flags will fly at half mast and public shows and concerts will be canceled. Castro's remains will be cremated, and his ashes toured around Cuba until his state funeral on Dec. 4. Official mourning began on Saturday and will last nine days, the government said.

'A figure of enormous historical importance'

Castro was mourned by some present and former national leaders, including Prime Minister Justin Trudeau, who called him "a larger than life leader" and a "legendary revolutionary and oratory."

"While a controversial figure, both Mr. Castro's supporters and detractors recognized his tremendous dedication and love for the Cuban people who had a deep and lasting affection for el Comandante," Trudeau said in a statement.

CBC's Paul Hunter takes a look at the life and legacy of the former Cuban leader 4:41

A statement from the Spanish government hailed Castro as "a figure of enormous historical importance."

"As a son of Spaniards, former president Castro always maintained close relations with Spain and showed great affection for his family and cultural ties. For this reason Spain especially shares the grief of Cuba's government and authorities," the government statement said.

There were shouts and insults in Madrid as a small crowd composed of both pro- and anti-Castro supporters met in front of the Cuban embassy.

'A friend of Mexico'

Pope Francis, who met Castro when he visited Cuba last year, said he had received the "sad news."

"I express to you my sentiments of grief," he said in a Spanish-language message to Fidel's brother, President Raul Castro.

A Cuban woman displays her T-shirt to the cameras after looking at tributes following the announcement of the death of Fidel Castro at the Cuban embassy in London. (Neil Hall/Reuters)

Chinese President Xi Jinping said in a statement that: "the Chinese people have lost a close comrade and a sincere friend."

Xi hailed Castro for his contribution to the development of communism both in Cuba and around the world.

In Venezuela, a long-time ally of Cuba and staunch opponent of the political stance of the U.S., President Nicolas Maduro said Castro had inspired and would continue to inspire his country.

"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 by telephone.

'An inspiring example'

In Bolivia, where Ernesto (Che) Guevara died in 1967 in a failed bid to export Cuba's revolution, President Evo Morales said in a statement: "Fidel Castro left us a legacy of having fought for the integration of the world's peoples."

Ecuadorean President Rafael Correa said: "A great has left us. Fidel has died. Long live Cuba! Long live Latin America!"

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."

A banner filled with images of Fidel Castro hangs on a government building in Havana, Cuba. (Ramon Espinosa/Associated Press)

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.

The UN Secretary-General Ban Ki-Moon said he was saddened to learn of the death of Castro.

"Castro will be remembered for his leadership of the Cuban revolution and for advances in Cuba in the fields of education, literacy and health," Ki-Moon said. "His revolutionary ideals left few indifferent. He was a strong voice for social justice in global discussions at the UN General Assembly and international and regional forums."

'Indefensible' rights abuses

Peter Hain, a former member of the British cabinet and anti-apartheid campaigner, tempered praise for Castro with criticism of some aspects of his long rule.