HAVANA, Cuba --As news of the death of former Cuban President Fidel Castro spread and funeral plans confirmed, foes celebrated while others mourned his loss.
A government statement issued Saturday said Castro's "example will live forever in our struggles and will flower in the noble ideas of new generations."
Cuban state television is carrying special programming celebrating his life, including footage from years past of Castro giving speeches on revolutionary struggle.
Castro stepped down from the presidency provisionally in 2006 due to a severe illness, and left office permanently two years later. He was succeeded by his younger brother Raul, who announced Fidel's death on state TV.
On Saturday, the nightly news started as usual on Cuban state television when suddenly President Raul Castro appeared, seated before a desk in military uniform and delivered the news.
A memorial for the public to pay their respects will start on Monday at the Jose Marti Memorial and run until Tuesday at noon. On those days, Cubans throughout the country will have the chance to pay homage and pledge their allegiance by signing a "solemn oath of complying with the concept of the revolution."
There will be a mass gathering in Havana's Plaza of the Revolution, where Castro often addressed massive crowds for hours.
Starting Wednesday, Castro's ashes will travel throughout the country starting in Havana and ending the eastern city of Santiago. The tour ends on Saturday with another mass gathering in the Plaza "Antonio Maceo."
On Sunday, the remains will be interred in the "Tanta Ifigenia" cemetery in the eastern city of Santiago, a city key to his early life and the Cuban revolution.
In the United States, within half an hour of the Cuban government's official announcement, Miami's Little Havana teemed with life - and cheers.
Thousands of people banged pots, waved Cuban flags and whooped in jubilation on Calle Ocho, the heart of the Cuban exile community in Florida. Honking and strains of salsa music from car stereos echoed against stucco buildings, and fireworks lit up the humid night sky.
Police blocked off streets leading to Cafe Versailles, the quintessential Cuban American hotspot where strong Cuban coffee was as common as a harsh words about Fidel Castro.
Castro has cast a shadow over Miami for decades, and in many ways, his policy and his power have shaped the city and its inhabitants, many of whom fled from his socialist rule.
Many in Havana were caught by surprise by surprise in the wee hours of the morning. Mariela Alonso is a 45-year-old doctor. She calls the retired Cuban leader "the guide for our people." "There will be no one else like him. We will feel his physical absence."
Mechanic Celestino Acosta was sitting on a porch in the capital's central neighborhood of Vedado. He called the news of Castro's death "a painful blow for everyone."
U.S. President-elect Donald Trump took to Twitter hours later to share a thought that proved pithy even for the medium: "Fidel Castro is dead!"
However, Castro was honored and mourned by some present and former national leaders.
"Free and independent Cuba, which he (Fidel Castro) and his allies built, became an influential member of the international community and became an inspiring example for many countries and nations," Russian President Vladimir Putin said in a telegram to President Raul Castro.
Mexican president Enrique Pena Nieto tweeted that "Fidel Castro was a friend of Mexico, promoting bilateral relations based on respect, dialogue and solidarity."
In a telegram to Raul Castro, Pope Francis offered "my sense of grief to your excellency and family."
In a sign of his personal esteem, Francis signed the telegram, breaking from the Vatican's usual practice of have the secretary of state send such messages. Francis met Castro during the papal visit to Cuba in September 2015.
Former U.S. president Jimmy Carter said he and his wife Rosalynn "remember fondly our visits with him in Cuba and his love of his country." The couple visited Cuba in 2002, long after Carter left office.
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.
"Although responsible for indefensible human rights and free-speech abuses, Castro created a society of unparalleled access to free health, education and equal opportunity despite an economically throttling USA siege," Hain said. "His troops inflicted the first defeat on South Africa's troops in Angola in 1988, a vital turning point in the struggle against apartheid."
"Fidel Castro in the 20th century did everything possible to destroy the colonial system, to establish cooperative relations," former Soviet President Mikhail Gorbachev was quoted as telling the Interfax news agency.
While most of the official remembrances were complimentary, a few emphasized less-flattering views of the late leader.
Ed Royce, chairman of the U.S. House of Representatives Foreign Affairs Committee, said "no one should rule anywhere near as long as Fidel Castro did." "His legacy is one of repression at home, and support for terrorism abroad. Sadly, Raul Castro is no better for Cubans who yearn for freedom," Royce said.
ABC News contributed to this report.