Fidel Castro, the controversial ruler who took power during the Cuban revolution in 1959 and led his country for nearly half a century, died in Havana, Cuba, at age 90.

Castro lived through 10 U.S. presidents who were determined to overthrow him, as NPR's Tom Gjelten reported, in addition to surviving the collapse of the communist alliance that bolstered his success.

The former president has suffered ill health since undergoing emergency intestinal surgery in July 2006, when he ceded power to his younger brother, Raúl, who formally assumed the presidency in 2008.

In a short, televised message, an emotional President Raul Castro announced that his brother had passed at 10:29 p.m. late Friday night, as NPR's Carrie Kahn translates:

"With profound pain I share with our people and the friends of America and the world that today, on the 25th of November at 10:29 p.m., the head commander of the Cuban Revolution, the comrade Fidel Castro Ruz died. In following the wishes expressed by Fidel, his remains will be cremated."In the early hours of tomorrow, Saturday the 26th, the funeral organizing commission will provide the people detailed information about the organization of a posthumous tribute to the founder of the Cuban Revolution. Towards victory forever."

Castro's rule was marked by his relationship with two global powers: the Soviet Union as his ally, the U.S. as his adversary, Tom tells our newscast.

"The Eisenhower Administration initially welcomed Castro to power; but as a nationalist he was determined to assert Cuba's independence from the United States, and by early 1960, Castro was reaching out to the Soviet Union for support. Before long, the U.S. government was helping Cuban exiles who wanted to overthrow Castro or even have him assassinated."The Soviet Union meanwhile gave Castro billions of dollars per year — enough to support health and education programs that won Cuba praise around the world. Castro lost that help when the Soviet Union collapsed; Cuba soon became impoverished."Relations with the U.S. never really improved during the time he was in charge, and Fidel Castro will be remembered as much for what he survived as for what he achieved."

The death of the polarizing former president has set off both mourning and celebration worldwide.

Silence has swept much of Cuba. The Cuban government announced Saturday morning that Castro's ashes will be interred on December 4, following nine days of national mourning, which officially began at 6 a.m. on Saturday.

As CNN notes, citing the state-run outlet, Granma, "During this time, all activities and public performances will stop, and the flag will be flown at half-staff in public and military establishments. Radio and television will broadcast patriotic and historical programming."

Foreign allies are paying tributes and expressing sorrow on Twitter, including Indian Prime Minister Narendra Modi and Mexican President Enrique Pena Nieto, who said Castro "was a friend" of Mexico.

El Salvador's President Salvador Sanchez Ceren called him an "eternal companion."

Venezuela's socialist President Nicolas Maduro said "revolutionaries of the world must follow his legacy."

President Obama released a statement acknowledging the United States' fraught history with Cuba under Castro's regime and the two countries' renewed diplomatic relationship. He also said:

We know that this moment fills Cubans - in Cuba and in the United States - with powerful emotions, recalling the countless ways in which Fidel Castro altered the course of individual lives, families, and of the Cuban nation. History will record and judge the enormous impact of this singular figure on the people and world around him.

Obama's statement concluded: "Today, we offer condolences to Fidel Castro's family, and our thoughts and prayers are with the Cuban people. In the days ahead, they will recall the past and also look to the future. As they do, the Cuban people must know that they have a friend and partner in the United States of America."

On Saturday morning, President-elect Donald Trump tweeted: "Fidel Castro is dead!"

Trump later released a longer statement saying his "administration will do all it can to ensure the Cuban people can finally begin their journey toward prosperity and liberty."

Meanwhile, just some 200 miles from Havana, the Cuban exile community in Miami, Florida's Little Havana, are spilling into the streets in jubilation, waving Cuban flags, cheering and dancing.

Cuban-Americans in Congress also reacted to the news of Castro's death. Democratic Sen. Bob Menendez of New Jersey released a statement that read, in part:

Since he took power over half a century ago, Fidel Castro proved to be a brutal dictator who must always be remembered by his gross abuses of human rights, systemic exploitation of Cubans, unrelenting repression, and stifling censorship upon his own people.Fidel's oppressive legacy will haunt the Cuban regime and our hemisphere forever.

In a statement, Republican Sen. Ted Cruz of Texas said:

Fidel Castro's death cannot bring back his thousands of victims, nor can it bring comfort to their families. Today we remember them and honor the brave souls who fought the lonely fight against the brutal Communist dictatorship he imposed on Cuba.

Republican Sen. Marco Rubio of Florida echoed these sentiments in his statement, adding:

The dictator has died, but the dictatorship has not. And one thing is clear, history will not absolve Fidel Castro; it will remember him as an evil, murderous dictator who inflicted misery and suffering on his own people.

And Republican congresswoman Ileana Ros-Lehtinen of Florida's 27th district celebrated Castro's death on Twitter.

The U.S. is home to roughly 2 million Cuban-Americans because they, or the generations before them, fled the island during Castro's rule. The majority live in Florida, NPR's Greg Allen reports to our newscast, where the U.S. government once launched failed attempts at overthrowing the young Castro regime:

"As Castro tightened his grip on Cuba, large numbers of people began fleeing the island. There were firing squads and property seizures. ...The first wave of exiles were mostly from Cuba's elite, businessmen and professionals. They came to Miami where many began working on an urgent goal—to oust Fidel Castro and take back their homeland.In Miami, a group of Cubans formed a paramilitary group, Brigade 2506. They worked with the CIA on a plan to retake Cuba after landing on a beach in the Bay of Pigs. The invasion was a disaster. More than 120 members of the invading force were killed. 1,200 were captured by Castro's military. Most of those captured were released a year later."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.