Fidel Castro, Cuba's former president and leader of the Communist revolution, has died aged 90, state TV has announced.
It provided no further details.

Fidel Castro ruled Cuba as a one-party state for almost half a century before handing over the powers to his brother Raul in 2008.

His supporters praised him as a man who had given Cuba back to the people. But his opponents accused him of brutally suppressing opposition.

In April, Fidel Castro gave a rare speech on the final day of the country's Communist Party congress.

He acknowledged his advanced age but said Cuban communist concepts were still valid and the Cuban people "will be victorious".

The revolutionary and former president retreated from the public eye in 2006 following emergency surgery for intestinal bleeding. His health problems forced him to temporarily hand power to his younger brother, defense minister Raul Castro, who permanently took his place as president in 2008.

Castro's death follows a historic thawing of relations between Cuba and the United States with the announcement in mid-December that the countries planned to restore diplomatic and economic ties.

Six weeks after that announcement, Castro made his first comments about the deal, writing that he backs the negotiations even though he distrusts American politics.

"I don't trust the policy of the United States, nor have I exchanged a word with them, but this does not mean I reject a pacific solution to the conflicts," he wrote in a letter to a student federation read at the University of Havana.

"We will always defend cooperation and friendship with all the people of the world, including with our political adversaries," he wrote.

The elder Castro made his last public appearance in January, attending an art studio opening in Havana. He was photographed entering the studio hunched over and using a cane. Later that month, however, U.N. Secretary-General Ban Ki-moon visited Castro and reported that then 87-year-old was "spiritually alert and physically very strong."

Over the summer, Castro met with the Russian president, Vladimir Putin, as well as the Chinese president, Xi Jinping.

Since relinquishing power six years ago, Castro's health had been the topic of intense speculation. On several occasions, media reported inaccurately that he was near death or had died. Once in 2012, Castro replied to the rumors himself in an article published on Cuba Debate, a state-run website, in which he boasted that he was not only alive, but didn't "even remember what a headache is."

Cuban Prime Minister Fidel Castro speaks on the eve of the military trial of more than a hundred insurgents captured in the mountains on Wednesday Oct. 10, 1960 in Havana. He warns "He who lives by the sword shall die by the sword" to those who attacked his regime. (AP Photo Read more: http://www.necn.com/news/national-international/Cubas-Fidel-Castro-Dies-252877991.html#ixzz4R5gQTEde Follow us: @nbcphiladelphia on Twitter | NBCPhiladelphia on Facebook
Cuban Prime Minister Fidel Castro speaks on the eve of the military trial of more than a hundred insurgents captured in the mountains on Wednesday Oct. 10, 1960 in Havana. He warns "He who lives by the sword shall die by the sword" to those who attacked his regime. (AP Photo)

Castro had defied death many times before, both as the revolutionary who led an armed uprising against dictator Fulgencio Batista, and as Batista's communist successor who inspired a number of U.S.-backed assassination plots. Nine U.S. presidents came and went during Castro's rule, which, like him, proved resilient, outlasting most other communist governments around the world.

For 49 years Castro ran Cuba, transforming what was once an American playground with striking social inequalities into a poor, isolated country with a notorious record on human rights. To some, he was a hero. Through a rigid system of socialized medicine, education and cultural facilities, Castro's government elevated Cuba's most impoverished citizens and reduced the sort of racial inequalities prevalent throughout the Americas. For challenging and insulting U.S. policies and presidents, he won the devotion of like-minded leaders, including the late Venezuelan president Hugo Chavez. In a 2004 speech slamming the U.S. war on terrorism, for example, Castro accused President George W. Bush of hypocrisy and fraud, while in 2011 he penned an op-ed in the Cuban press calling President Barack Obama "stupid."

His own critics, however, were not tolerated. To those who challenged his revolutionary vision or lived outside of the rigid framework he established on the island -- which for years quarantined its HIV-positive citizens and jailed everyone from dissidents to homosexuals -- he was a brutal dictator.

Castro's human rights abuses and economic policies prompted throngs of Cubans to flee, many risking their lives to do so. One of the largest mass exoduses came in 1980 when Castro opened the exits to more than a hundred thousand citizens, including prisoners and mental patients who were loaded on boats bound for Florida. In a speech to supporters, Castro happily bid them farewell and mocked the United States for "doing an excellent sanitation job for us."

In his final years, however, Castro appeared to be taking a more critical look at the policies he had enacted, calling his government's treatment of gays, for example, an "injustice," and saying in 2010 that "the Cuban model [of communism] doesn't even work for us anymore."

Indeed, Raul Castro has loosened both travel restrictions and the government's grip on the economy since taking power in 2008, allowing citizens to open some small businesses and legally buy everything from computers and cell phones to foreign cars, however exorbitantly taxed they may be.

The agreement to normalize relations between Cuba and the United States came as prisoners in both countries were freed, among them U.S. subcontractor Alan Gross, sentenced in 2009 to 15 years in prison for trying to set up internet access for the Jewish community in Cuba. But the U.S. trade embargo in place for more than 50 years remained in place. Only Congress can lift it.

Raul Castro, currently 82, announced last year that he will not seek reelection at the end of his second term in 2018, which will leave the leadership of the country open to someone other than an original Cuban revolutionary for the first time since the overthrow of Batista.

Fidel Alejandro Castro Ruz, the illegitimate son of a wealthy Spanish-born landowner and his cook, was born Aug. 13, 1926. His upbringing, which exposed him to both the privilege and poverty of his nation, laid the groundwork for his revolutionary path later on.

His political views were further shaped at the University of Havana, where he studied law. After graduating, he delved deeper into revolutionary politics and ultimately organized the rebellion that would overthrow Batista. Joined by his brother Raul, and the legendary guerrilla fighter Ernesto "Che" Guevarra, Castro succeeded in ousting his predecessor in 1959 after two failed attempts, one of which landed him in prison.

While the United States quickly recognized Castro's new government, it cut off diplomatic ties as the country's communist policies – such as the nationalization of U.S. properties in Cuba – became clear.

The next few years were marked by increasingly desperate attempts on the part of the U.S. to remove Castro from power. The Bay of Pigs invasion, a botched mission that sent U.S.-trained Cuban exiles back home to take down Castro, became one of the biggest embarrassments of John F. Kennedy's presidency, and emboldened Castro and his supporters.

Months later, Castro green-lighted the construction of Soviet nuclear missile sites on the island, well within range of U.S. targets. When Kennedy caught wind of the plans, a 13-day standoff ensued, with Kennedy ultimately convincing the Soviets to back down in exchange for the removal of U.S. missiles from Turkey. The so-called Cuban Missile Crisis was a defining moment for both Kennedy and Castro and further embittered relations between the two countries.

Castro's prolific writing and famously long-winded speeches regularly featured tirades against the U.S. and insistence that Cuba would never change course. "Socialism or death! Fatherland or death!" was the motto.

Though he demonstrated, throughout his life, his willingness to die for his vision and values, he survived one of the longest and most controversial political careers of the 20th Century, only stepping down as the result of his declining health.

Little is known about how Castro spent his final years. The topic of both his health and personal life have been closely guarded secrets, with Castro revealing only as much as he wished. It is unclear, for example, just how many children he fathered. Asked in an interview for Vanity Fair in 1993, Casto replied, "it's almost a tribe."

What is known is this: He was married twice, first to Mirt Diaz-Balart, whom he divorced in 1955 after having one child, and later to Dalia Soto del Valle, with whom he had five sons. Others have been cited as mistresses and children, including Alina Fernandez, a Cuban exile who published a memoir about growing up as Castro's daughter in 1960s Cuba.

After leaving the presidency, Castro wrote a series of his own personal reflections, though his focused mainly on past and current events. In his final post, published in September 2013, Castro expressed relief that the U.S. appeared to be backing away from plans to intervene militarily in Syria's civil war--a move, he said, that could prevent "global catastrophe."