Undated handout picture released by Cuban website "Cubadebate" on August 5, 2010, showing Fidel Castro (L) and revolutionary commander Juan Almeida Bosque in Sierra Maestra, Cuba.
JOHANNESBURG - Fidel Castro, Prime Minister of Cuba from 1959 to 1976 and president from 1976 to 2008, has died, aged 90.
Cuban President Raul Castro has Announced the Death of His Brother Fidel Castro on Cuban State Media https://t.co/StNgSd0RH0— FOX40 News (@FOX40) November 26, 2016
The son of a wealthy farmer, Castro's life as a Marxist-Leninist revolutionary began during his stint at the University of Havana.
Cuban state-run television announces Fidel Castro died at 7pm local time today. He was 90 years old.— Jesse Rodriguez (@JesseRodriguez) November 26, 2016
He was a key figure in the Cuban Revolution that overthrew Cuban President Fulgencio Batista in 1959, before he assumed military and political power as Cuba's Prime Minister, turning Cuba into a one-party socialist state.
He was lauded as a socialist, anti-imperialist and humanist, and played a key role in the South African conflict, supplying troops and support to the Angolan regime during their Cold War battle with South Africa in the north of what was then South West Africa, prior to Namibia achieving independence.
Castro in history
No one could have predicted his place in history when he launched his revolutionary career with a botched attack on Cuba's Moncada military barracks in 1953.
The 26-year-old lawyer was captured and jailed for the failed raid, which ended with dozens of rebels killed or executed by dictator Fulgencio Batista's forces.
Fast forward six years, and Castro was triumphantly rolling into Havana, having returned from exile to lead a guerrilla army that once numbered just 12 men to defeat Batista and his military of 80,000.
"Condemn me, it does not matter; history will absolve me." Long Live Fidel Castro and Long Live Cuba pic.twitter.com/6TLQjbxAPT— History In Pictures (@HistoryInPix) November 26, 2016
The unlikely victory brought the "red menace" of Communism to the United States' doorstep at the height of the Cold War.
Alarmed, the US Central Intelligence Agency and Cuban exiles tried to assassinate Castro 634 times, his ex-intelligence chief, Fabian Escalante, has estimated.
Castro once told Spanish journalist Ignacio Ramonet he nearly always carried his Browning pistol just in case.
But he denied reports he wore a bullet-proof vest.
"I have a moral vest. It's strong. It has always protected me," he told journalists in 1979, baring his chest to prove the point.
Castro and the US
Castro defined himself in opposition to the American "empire," and the resentment lingers to his dying day.
RIP Fidel Castro— Chico DeBeard (@CivilJustUs) November 26, 2016
For better or worse you stood toe to toe with US imperialism and held it down. pic.twitter.com/YvMufTAyDx
After Barack Obama sealed the two nations' historic rapprochement by visiting Cuba in March, Castro told Cubans not to be fooled by the US president's "syrupy words."
He recalled the island's long enmity with the US, including Washington's backing for the failed invasion of Cuba at the Bay of Pigs in 1961.
His bitterness over that botched CIA plot played a part in pushing the world to the brink of nuclear war during the Cuban Missile Crisis the following year, when the Soviet Union agreed to his request to send ballistic missiles to Cuba.
Castro had a penchant for trying to pull off the seemingly impossible.
In 1961, he all but eradicated illiteracy with an ambitious rural education campaign.
When the exodus of Cuban exiles left the country with just 3,000 doctors, he vowed to make the island a "medical superpower." Today it has 88,000 doctors and one of the most respected health systems in the world.
Fidel Castro playing basketball with students in Krakow during an official visit to Poland, 1972. pic.twitter.com/YLgUmhLjd8— History In Pictures (@HistoryInPix) November 26, 2016
Other projects were less successful.
In 1970, with Cuba's economy strangled by the US embargo, he ordered a nationwide campaign to harvest a record-shattering 10 million tons of sugar.
Despite mobilising Cubans en masse to work the fields, the campaign failed.
Castro as revolutionary icon
As Castro gave his speech proclaiming the triumph of the revolution in 1959, a white dove landed on his shoulder. The man had officially become the myth.
In a country where Catholicism blends with African religions, Cubans say Castro is protected by Obatala, the most powerful of the "orisha" divinities.
Some thought him immortal, until a health crisis forced him to give up power in 2006.
But more than anything, Castro was a hero to revolutionary movements and independence struggles worldwide.
He sent 386,000 troops to fight in spots where the Cold War turned hot: Angola, Ethiopia, the Congo, Algeria and Syria. And he backed leftist guerrillas across Latin America.
The military results were mixed. But the symbolism was powerful.
"He's the most important personality of the 20th century in the Western hemisphere," said Ivan Marquez, second-in-command of the Revolutionary Armed Forces of Colombia (FARC).
Castro's revolution "ignited... the desire to struggle, to take to the mountains, to grab a rifle and try to change things," Marquez told AFP.
Castro and mortality
Last April, Castro seemed to say goodbye.
"Soon I'll be like all the rest. Everyone's turn comes," he said.
Fidel Castro (August 13, 1926 - November 25, 2016).
Additional reporting AFP.