Fidel Castro, the Cuban revolutionary leader who built a communist state on the doorstep of the United States and for five decades defied U.S. efforts to topple him, died on Friday. He was 90.
A towering figure of the second half of the 20th Century, Castro stuck to his ideology beyond the collapse of Soviet communism and remained widely respected in parts of the world that had struggled against colonial rule.
He had been in poor health since an intestinal ailment nearly killed him in 2006. He formally ceded power to his younger brother Raul Castro two years later.
See images of Fidel Castro:
Wearing a green military uniform, a somber Raul Castro, 85, appeared on state television on Friday night to announce his brother's death.
"At 10.29 at night, the chief commander of the Cuban revolution, Fidel Castro Ruz, died," he said, without giving a cause of death.
"Ever onward, to victory," he said, using the slogan of the Cuban revolution.
Tributes came in from allies, including Indian Prime Minister Narendra Modi and Venezuela's socialist President Nicolas Maduro, who said "revolutionaries of the world must follow his legacy."
Although Raul Castro always glorified his older brother, he has changed Cuba since taking over by introducing market-style economic reforms and agreeing with the United States in December 2014 to re-establish diplomatic ties and end decades of hostility.
Fidel Castro offered only lukewarm support for the deal, raising questions about whether he approved of ending hostilities with his longtime enemy.
He did not meet Barack Obama when he visited Havana earlier this year, the first time a U.S. president had stepped foot on Cuban soil since 1928.
Days later, Castro wrote a scathing newspaper column condemning Obama's "honey-coated" words and reminding Cubans of the many U.S. efforts to overthrow and weaken the Communist government.
The news of Castro's death spread slowly among Friday night revelers on the streets of Havana. One famous club that was still open when word came in quickly closed.
Some residents reacted with sadness to the news.
"I'm very upset. Whatever you want to say, he is a public figure that the whole world respected and loved," said Havana student Sariel Valdespino.
But in Miami, where many exiles from Castro's Communist government live, a large crowd waving Cuban flags cheered, danced and banged on pots and pans.
Castro's body will be cremated, according to his wishes. His brother said details of his funeral would be given on Saturday.
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.
He was demonized by the United States and its allies but admired by many leftists around the world, especially socialist revolutionaries in Latin America and Africa.
After Nelson Mandela was freed from prison in 1990, he repeatedly thanked Castro for his firm efforts to weaken apartheid.
In April, in a rare public appearance at the Communist Party conference, Fidel Castro shocked party apparatchiks by referring to his own imminent mortality.
"Soon I will be like all the rest. Our turn comes to all of us, but the ideas of the Cuban communists will remain," he said.
Castro was last seen by ordinary Cubans in photos showing him engaged in conversation with the Vietnamese President Tran Dai Quang earlier this month.
Transforming Cuba from a playground for rich Americans into a symbol of resistance to Washington, Castro crossed swords with 10 U.S. presidents while in power and outlasted nine of them.
He fended off a CIA-backed invasion at the Bay of Pigs in 1961 as well as countless assassination attempts.
His alliance with Moscow helped trigger the Cuban Missile Crisis in 1962, a 13-day showdown with the United States 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 United States.
At home, he swept away capitalism and won support for bringing schools and hospitals to the poor. But he also created legions of enemies and critics, concentrated among the exiles in Miami who fled his rule and saw him as a ruthless tyrant.
"With Castro's passing, some of the heat may go out of the antagonism between Cuba and the United States, and between Cuba and Miami, which would be good for everyone," said William M. LeoGrande, co-author of a book on U.S.-Cuba relations.
However, it is not clear if U.S. President-Elect Donald Trump will continue to normalize relations with Cuba, or revive tensions and fulfill a campaign promise to close the U.S. embassy in Havana once again.
Castro's death - which would once have thrown a question mark over Cuba's future - seems unlikely to trigger a crisis as Raul Castro is firmly ensconced in power.
In his final years, Fidel Castro no longer held leadership posts. He wrote newspaper commentaries on world affairs and occasionally met with foreign leaders but he lived in semi-seclusion.
Still, the passing of the man known to most Cubans as "El Comandante" - the commander - or simply "Fidel" leaves a huge void in the country he dominated for so long. It also underlines the generational change in Cuba's communist leadership.
See more on Fidel Castro:
Raul Castro vows to step down when his term ends in 2018 and the Communist Party has elevated younger leaders to its Politburo, including 56-year-old Miguel Diaz-Canel, who is first vice-president and the heir apparent.
Others in their 50s include Foreign Minister Bruno Rodriguez and economic reform czar Marino Murillo.
The reforms have led to more private enterprise and the lifting of some restrictions on personal freedoms but they aim to strengthen Communist Party rule, not weaken it.
"I don't think Fidel's passing is the big test. The big test is handing the revolution over to the next generation and that will happen when Raul steps down," Cuba expert Phil Peters of the Lexington Institute in Virginia said before Castro's death.
A Jesuit-educated lawyer, Fidel Castro led the revolution that ousted U.S.-backed dictator Fulgencio Batista on Jan 1, 1959. Aged 32, he quickly took control of Cuba and sought to transform it into an egalitarian society.
His government improved the living conditions of the very poor, achieved health and literacy levels on a par with rich countries and rid Cuba of a powerful Mafia presence.
But he also tolerated little dissent, jailed opponents, seized private businesses and monopolized the media.
Castro's opponents labeled him a dictator and hundreds of thousands fled the island.
"The dictator Fidel Castro has died, the cause of many deaths in Cuba, Latin American and Africa," Jose Daniel Ferrer, leader of the island's largest dissident group, the Patriotic Union of Cuba, said on Twitter.
Many dissidents settled in Florida, influencing U.S. policy toward Cuba and plotting Castro's demise. Some even trained in the Florida swamps for the disastrous Bay of Pigs invasion.
But they could never dislodge him.
Castro claimed he survived or evaded hundreds of assassination attempts, including some conjured up by the CIA.
In 1962, the United States imposed a damaging trade embargo that Castro blamed for most of Cuba's ills, using it to his advantage to rally patriotic fury.
Over the years, he expanded his influence by sending Cuban troops into far-away wars, including 350,000 to fight in Africa. They provided critical support to a left-wing government in Angola and contributed to the independence of Namibia in a war that helped end apartheid in South Africa.
He also won friends by sending tens of thousands of Cuban doctors abroad to treat the poor and bringing young people from developing countries to train them as physicians.
'HISTORY WILL ABSOLVE ME'
Born on August 13, 1926 in Biran in eastern Cuba, Castro was the son of a Spanish immigrant who became a wealthy landowner.
Angry at social conditions and Batista's dictatorship, Fidel Castro launched his revolution on July 26, 1953, with a failed assault on the Moncada barracks in the eastern city of Santiago.
"History will absolve me," he declared during his trial for the attack.
He was sentenced to 15 years in prison but was released in 1955 after a pardon that would come back to haunt Batista.
Castro went into exile in Mexico and prepared a small rebel army to fight Batista. It included Argentine revolutionary Ernesto "Che" Guevara, who became his comrade-in-arms.
In December 1956, Castro and a rag-tag band of 81 followers sailed to Cuba aboard a badly overloaded yacht called "Granma".
Only 12, including him, his brother and Guevara, escaped a government ambush when they landed in eastern Cuba.
Taking refuge in the rugged Sierra Maestra mountains, they built a guerrilla force of several thousand fighters who, along with urban rebel groups, defeated Batista's military in just over two years.
Early in his rule, at the height of the Cold War, Castro allied Cuba to the Soviet Union, which protected the Caribbean island and was its principal benefactor for three decades.
The alliance brought in $4 billion worth of aid annually, including everything from oil to guns, but also provoked the 1962 Cuban Missile Crisis when the United States discovered Soviet missiles on the island.
Convinced that the United States was about to invade Cuba, Castro urged the Soviets to launch a nuclear attack.
Cooler heads prevailed. Soviet leader Nikita Khrushchev and U.S. President John F. Kennedy agreed the Soviets would withdraw the missiles in return for a U.S. promise never to invade Cuba. The United States also secretly agreed to remove its nuclear missiles from Turkey.
When the Soviet Union collapsed in 1991, an isolated Cuba fell into a deep economic crisis that lasted for years and was known as the "special period". Food, transport and basics such as soap were scarce and energy shortages led to frequent and long blackouts.
Castro undertook a series of tentative economic reforms to get through the crisis, including opening up to foreign tourism.
The economy improved when Venezuela's late socialist leader Hugo Chavez, who looked up to Castro as a hero, came to the rescue with cheap oil. Aid from communist-run China also helped, but an economic downturn in Venezuela since Chavez's death in 2013 have raised fears it will scale back its support for Cuba.
Plagued by chronic economic problems, Cuba's population of 11 million has endured years of hardship, although not the deep poverty, violent crime and government neglect of many other developing countries.
For most Cubans, Fidel Castro has been the ubiquitous figure of their entire life.
Many still love him and share his faith in a communist future, and even some who abandoned their political belief still view him with respect. But others see him as an autocrat and feel he drove the country to ruin.
Cubans earn on average the equivalent of $20 a month and struggle to make ends meet even in an economy where education and health care are free and many basic goods and services are heavily subsidized.
It was never clear whether Fidel Castro fully backed his brother's reform efforts of recent years. Some analysts believed his mere presence kept Raul from moving further and faster while others saw him as either quietly supportive or increasingly irrelevant.
(Reporting by Daniel Trotta and Marc Frank; Editing by Kieran Murray and Simon Cameron-Moore/Hugh Lawson)