Fidel Castro, the controversial revolutionary leader and former head of state of Cuba, has died at the age of 90, Cuban state television announced.

One of the world’s longest-serving political leaders, Castro ruled Cuba for 49 years after playing a central role in the Cuban Revolution in the 1950s. He cut a divisive figure during his lifetime, transforming Cuba into the Western Hemisphere’s first communist country and becoming a thorn in the side of the United States during the Cold War.

Hailed by supporters as a hero who fought for socialist ideals by standing up to the U.S. and the world’s other political giants, Castro was seen by critics as a ruthless dictator guilty of subjecting his people to countless human rights abuses, devastating Cuba’s economy and forcing more than a million Cubans to flee the island.

Credit: Associated Press Fidel Castro cut a divisive figure during his lifetime.

HUMBLE BEGINNINGS

The illegitimate son of a successful sugar cane farmer, Fidel Alejandro Castro Ruz was born Aug. 13, 1926, on his father’s farm, near Birán, Cuba. Educated in private Jesuit boarding schools, Castro was a clever and athletic but rambunctious child. In high school, his reckless behavior reportedly earned him the nickname “El Loco,” the crazy one. This reputation followed him to the University of Havana, where he began studying law in 1945.

The university was a hotbed of political activity at the time, and Castro became interested in politics and activism. Influenced by the ideology of Cuban nationalism, he became a vocal student activist. He frequently organized strikes and demonstrations and spoke out against then-President Ramón Grau and his government.

“Fidel’s generation had a terrible sense of frustration,” veteran American journalist Georgie Anna Geyer said in a 2005 PBS documentary on Castro. “Cuba was supposed to be one of the three wealthiest countries in the hemisphere, with the United States and Argentina, and yet they couldn’t put themselves together politically. ... They saw leader after leader either be corrupt, killed, replaced by the United States ― fail, fail, fail.”

Castro showed signs of brilliance as a college student, but he was also rumored to have been involved in acts of violence. His reputation at the time was such that when a young woman named Mirta Díaz Balart (whom Castro would marry in 1948) fell in love with him, her brother gave her the following warning: “You know he’s crazy, he’s paranoid and a psychopath who’d just as soon throw you off the 10th floor as buy you a mink coat.”

Credit: CBS Photo Archive via Getty Images "Condemn me, it does not matter. History will absolve me," Castro famously said during his trial.

REVOLUCIÓN

Castro graduated from the University of Havana in 1950 with a doctorate in law, and he started a small law practice. Politics, however, remained his primary passion, and he began campaigning with the Ortodoxo party for a place in congress.

But in March 1952, Castro’s political ambitions ― and Cuba’s democracy ― were derailed when General Fulgencio Batista led a coup d’etat, ousting the sitting president. As a dictator, Batista became increasingly ruthless, and his government grew ever more corrupt.

Castro, together with his brother Raúl and more than 100 other rebels, organized an attack against the Batista regime. Their target: the Moncada Barracks, one of the largest military garrisons in the country. Usually regarded as the beginning of the Cuban Revolution, the July 26, 1953, offensive was a total disaster. Dozens of rebels either were killed or were captured, tortured and later executed. Castro and his brother were caught and sentenced to 15 years behind bars.

“Condemn me, it does not matter. History will absolve me,” Castro, who argued in his own defense, famously said during his trial.

Credit: AFP via Getty Images Castro became an icon, a symbol of the anti-Batista movement.

Though the Moncada Barracks attack was, from a military perspective, a failure for the rebels, it had tremendous symbolic value. Castro became an icon, a symbol of the anti-Batista movement. In 1955, he and Raúl were released from prison as part of an amnesty deal with the Batista government. The brothers then traveled to Mexico, where they prepared to re-launch their revolutionary campaign. It was there that they met Argentine Marxist revolutionary Ernesto “Che” Guevara, who played an instrumental role in the revolution and the early years of Cuba’s new regime.

On Dec. 2, 1956, a group of 82 men, including Castro, his brother and Guevara, landed in Cuba on an overloaded yacht named the Granma. Like Moncada, the attack was a disaster, and most of the men were killed. A small group of survivors managed to flee into the mountains, where they recruited new fighters. The revolutionaries went on to engage in a fierce and successful guerrilla war against government troops.

On New Year’s Day 1959, following years of clashes with the rebels, Batista fled Cuba.

Credit: Keystone via Getty Images Castro was sworn in as prime minister of Cuba in 1959.

Considered by many to be a national hero, Castro in February 1959 was sworn in as prime minister of Cuba.

While the international community criticized Castro’s government for its brutal campaign of retribution against Batista supporters, the Cuban people were firmly on Castro’s side. Hundreds of thousands of Cubans would gather and cheer as he delivered long, rousing speeches ― some of them lasting hours ― about the revolution.

The Cuban people “turned their good will, their faith and their judgment over to Fidel Castro,” Marifeli Pérez-Stable, a Cuban-born scholar and professor who now lives in the United States, told PBS in 2005, “and that was huge political capital, political capital that allowed him to centralize power.”

José Orlando Padrón, the Cuban émigré who founded Padrón Cigars, put it another way, saying in the 2012 documentary “Cubamerican,” “We followed him, and we were all fooled.”

Underwood Archives via Getty Images Castro declared his allegiance to the USSR early on in his rule.

COLD WAR

In the decades that followed, Castro would rule Cuba with an iron fist, becoming a force to be reckoned with on the international stage.

During the Cold War, Castro’s Cuba proved especially influential in the politics of the day. He revealed his belief in socialism and declared his allegiance to the USSR early on in his rule. Castro also never minced words about his animosity toward the United States and all capitalistic and imperialistic enterprises.

In 1960, at the beginning of what would become a decades-long enmity between the two neighbors, Castro expropriated American-owned property and nationalized U.S.-owned assets and companies in Cuba. Annoyed and alarmed by Castro’s behavior and his close ties to the Soviets, the U.S. retaliated, first by initiating an economic embargo that would cripple Cuba’s economy and then by plotting his overthrow with the 1961 Bay of Pigs invasion, a CIA-orchestrated attack on Cuba that proved disastrous for the Americans.

A year after the invasion, Castro became a central figure in the most harrowing close call of the Cold War: the Cuban Missile Crisis.

Castro had consented to let the Soviets deploy ballistic missiles to Cuba, reportedly telling then-Soviet leader Nikita Khrushchev in a letter that a nuclear strike should be launched against the United States and that the Cuban people were “prepared to sacrifice themselves for the cause of the destruction of imperialism and the victory of world revolution.”

After the missiles were spotted by an American spy plane in October 1962, the destruction Castro spoke of was almost realized. Over the next two weeks, as the Soviets and the Americans engaged in tense negotiations, the world spun closer to nuclear war than at any other time before or since. Fortunately, however, the USSR ― to Castro’s fury ― finally agreed to remove the missiles from Cuba, and the crisis was averted.

Credit: Associated Press Castro was notorious for delivering incredibly lengthy speeches. His longest on record in Cuba was 7 hours and 10 minutes.

In 2006, after falling ill with an undisclosed disease, Castro handed the reins of power to his brother Raúl Castro. Fidel Castro officially resigned in 2008, after 49 years as Cuba’s head of state.

Raúl Castro charted a new course for the country, outwardly maintaining his brother’s ideological commitment to communism while slowly liberalizing the economy. Under a series of reforms implemented in 2011, the government eliminated some 500,000 state jobs and allowed more Cubans to run independent businesses and to buy and sell homes.

The reforms walked back some of the basic tenets of the revolution, but by then it appeared that even Fidel Castro was ready for at least a modest change. In an unusual 2010 interview with Jeffrey Goldberg of The Atlantic, Castro said “the Cuban model doesn’t even work for us anymore.”

Perhaps most importantly, Raúl Castro worked with the Obama administration to set aside five decades of hostility between the two countries by resuming formal diplomatic relations. The deal, brokered secretly by Pope Francis in 2014, stopped short of ending the embargo, which requires approval from Congress. But President Barack Obama continued to chip away at the trade restrictions and took the unprecedented step of visiting the island in March.

Despite the diplomatic opening, Fidel Castro continued to lambast the United States and at times criticized Obama in periodic “Reflections” published in the state press. “One imagines that every one of us was at risk of a heart attack while listening to those words of the president of the United States,” Castro wrote of Obama’s speech at the Gran Teatro in Havana.

Fidel Castro’s criticism notwithstanding, the flurry of changes to U.S. policy have dovetailed with Raúl Castro’s steps toward economic liberalization. For the Cubans who’ve embraced the opportunity to run independent restaurants, drive taxis or rent rooms through Airbnb, catering to foreign tourists offers earning potential that can easily triple the average state salary of around $20 per month in a single day.

LEGACY OF CONTROVERSY

Over the course of his rule, Castro was credited with instituting some positive social reforms, such as universal health care and education. In 2011, the literacy rate in Cuba was estimated to be 99.8 percent

In 2006, the left-wing British politician Ken Livingstone, who was then mayor of London, praised Castro’s social reforms. “What’s amazing here is you’ve got a country that’s suffered an illegal economic blockade by the United States for almost half a century and yet it’s been able to give its people the best standard of health care, brilliant education,” Livingstone’s been quoted as saying. “To do this in the teeth of an almost economic war is a tribute to Fidel Castro.”

However, in his years in power, Castro is also said to have demanded absolute subservience from the Cuban people and was known for quashing freedom of press and imprisoning people he deemed “anti-social,” including dissidents, artists and members of the LGBT community.

“For almost five decades, Cuban citizens have been systematically deprived of their fundamental rights to free expression, privacy, association, assembly, movement, and due process of law,” Human Rights Watch said in 2008. “Tactics for enforcing political conformity have included police warnings, surveillance, short-term detentions, house arrests, travel restrictions, criminal prosecutions, and politically motivated dismissals from employment.”

Castro is believed to have imprisoned thousands of political prisoners. More than one million Cubans fled the country during the years he held power.

Credit: Jorge Rey/Getty Images Castro handed over power to his brother Raul after falling ill in 2006.

Members of Castro’s own family have denounced him and his actions. His sister Juanita Castro, who fled Cuba in the 1960s, famously said shortly after her defection: “I cannot any longer remain indifferent to what is happening in my country. My brothers Fidel and Raúl have made it an enormous prison surrounded by water. The people are nailed to a cross of torment imposed by international communism.”

Alina Fernández, one of Castro’s daughters (he fathered at least eight children), has also been extremely critical of his regime. Fernández, who fled Cuba in 1993, was once quoted as saying that her father’s legacy would be a “country ruined ... with part of its people in exile, an experience very hard and very difficult to cure.”

On the international stage, Castro was beloved and despised in equal measure. He claimed to have survived more than 630 assassination attempts, most of them allegedly orchestrated by the CIA. But for all his enemies, he never had a shortage of avid supporters.

Twice elected the leader of the Non-Aligned Movement, an intergovernmental organization dedicated to representing the interests of developing countries, Castro has also been praised by several influential figures ― among them, former South African leader Nelson Mandela and civil rights activist Jesse Jackson ― for his bravery and revolutionary zeal. Castro is “the most honest, courageous politician I have ever met,” Jackson has been quoted as saying.

Under Castro, Cuba was seen by many in the developing world as a revolutionary center, and Castro played an influential role in the anti-imperialism and anti-colonialism that was sweeping across the world in the latter half of the 20th century. In 2001, Castro was nominated for a Nobel Peace Prize for his work on behalf of developing nations.

The Cuban leader also spoke up against global warming and other environmental issues and was lauded by some for his environmentalism and green policies.

Credit: Associated Press The world has remained divided over Castro's legacy.

Ultimately, the world has remained divided over his legacy.

In 2003, near the end of Castro’s tenure as president of Cuba, author Anthony Daniels wrote of him: “Nearly half a century after he first took power, he fascinates in a way that the younger gray functionaries who now control the world do not, and he still provokes the strongest passions. No one is neutral about him.”

Roque Planas contributed reporting.