Fidel Castro, the Cuban revolutionary leader who built a communist state on the doorstep of the United States, has died, state-run Cuban Television says.
Castro, 90, has been in poor health since an intestinal ailment nearly killed him in 2006. In 2008, he ceded power to his younger brother, Raul Castro, who announced his brother's death on Friday evening.
The bearded Fidel Castro took power in a 1959 revolution and ruled Cuba for 49 years with a mix of charisma and iron will, creating a one-party state and becoming a central figure in the Cold War.
"Men do not shape destiny. Destiny produces the man for the moment," he said in 1959.
He was demonised by the United States and its allies, but admired by many leftists around the world, especially socialist revolutionaries in Latin America and Africa.
Transforming Cuba from a playground for rich Americans into a symbol of resistance to Washington, Castro outlasted nine US presidents.
He fended off a CIA-backed invasion at the Bay of Pigs in 1961 and countless assassination attempts.
His alliance with Moscow helped trigger the Cuban Missile Crisis in 1962, a 13-day showdown with the US that brought the world the closest it has been to nuclear war.
Wearing green military fatigues and chomping on cigars for many of his years in power, Castro was famous for long, fist-pounding speeches filled with blistering rhetoric, often aimed at the US.
At home, he swept away capitalism and won support for bringing schools and hospitals to the poor. He also created legions of enemies and critics, concentrated among Cuban exiles in Miami who fled his rule and saw him as a ruthless tyrant.
Although Raul Castro glorified his older brother, he changed Cuba after taking over. He introduced market-style economic reforms and agreed with the US in December 2014 to re-establish diplomatic ties and end decades of hostility.
Fidel Castro offered lukewarm support for the deal. He lived to witness the visit of US President Barack Obama to Cuba earlier this year, the first trip by a US president to the island since 1928.
Fidel Castro did not meet Obama. Days later he wrote a scathing column condemning the his "honey-coated" words and reminding Cubans of the many US efforts to overthrow and weaken the Communist government.
In his final years, Fidel Castro did not hold leadership posts and only occasionally appeared in public. He wrote newspaper commentaries on world affairs and occasionally met with foreign leaders, but lived in semi-seclusion.
Fidel Castro holds the record for the longest speech ever delivered to the United Nations: 4 hours and 29 minutes, on 26 September 1960, according to the UN website.
He claimed he survived 634 attempts or plots to assassinate him, mainly masterminded by the Central Intelligence Agency and US-based exile organisations. One alleged plan involved giving him powder that would make his beard fall out and so undermine his popularity.
Fidel Castro gave up Cuban cigars in 1985.
Time Magazine in 2012 named Castro as one of the 100 most influential personalities of all time.
Fidel Castro had nine children from five women.