(CNN) Fidel Castro, the Cuban despot who famously proclaimed after his arrest in a failed coup attempt that history would absolve him, has died at age 90.

Castro's brother and the nation's President, Raul, announced his death Friday on Cuban TV.

At the end, an elderly and infirm Fidel Castro was a whisper of the Marxist firebrand whose iron will and passionate determination bent the arc of destiny.

"There are few individuals in the 20th century who had a more profound impact on a single country than Fidel Castro had in Cuba," Robert Pastor, a former national security adviser for President Jimmy Carter in the 1970s, told CNN in 2012.

"He reshaped Cuba in his image, for both bad and good," said Pastor, who died in 2014.

Photos: Former Cuban leader Fidel Castro dies Fidel Castro exhales cigar smoke during a March 1985 interview at his presidential palace in Havana, Cuba. Castro died at age 90 on November 25, 2016, Cuban state media reported. Click through to see more photos from the life of the controversial Cuban leader who ruled for nearly half a century: Hide Caption 1 of 37 Photos: Former Cuban leader Fidel Castro dies A portrait of Castro in New York in 1955. He was in exile after being released as part of a general amnesty for political prisoners in Cuba. Two years earlier, he and about 150 others staged an unsuccessful attempt to overthrow the regime of Fulgencio Batista. Hide Caption 2 of 37 Photos: Former Cuban leader Fidel Castro dies Castro with Argentine revolutionary Che Guevara during the early days of their guerrilla campaign in Cuba's Sierra Maestra mountains. Guevara, Castro and Castro's brother Raul organized a group of Cuban exiles that returned to Cuba in December 1956 and waged a guerrilla war against government troops. Hide Caption 3 of 37 Photos: Former Cuban leader Fidel Castro dies Castro and his revolutionaries hold up their rifles in January 1959 after overthrowing Batista. Hide Caption 4 of 37 Photos: Former Cuban leader Fidel Castro dies Crowds cheer Castro on his victorious march into Havana in 1959. Hide Caption 5 of 37 Photos: Former Cuban leader Fidel Castro dies Surrounded by rebels who came with him from the mountains, Castro gives an all-night speech. Hide Caption 6 of 37 Photos: Former Cuban leader Fidel Castro dies Castro, left, became Cuba's prime minister in February 1959. His brother Raul, right, was commander in chief of the armed forces. Hide Caption 7 of 37 Photos: Former Cuban leader Fidel Castro dies During a visit to New York in 1959, Fidel Castro spends time with a group of children. Hide Caption 8 of 37 Photos: Former Cuban leader Fidel Castro dies American talk-show host Ed Sullivan interviews Castro on a taped segment in 1959. Hide Caption 9 of 37 Photos: Former Cuban leader Fidel Castro dies Castro shakes hands with US Vice President Richard Nixon during a reception in Washington in 1959. Hide Caption 10 of 37 Photos: Former Cuban leader Fidel Castro dies Castro addresses the UN General Assembly in September 1960. Hide Caption 11 of 37 Photos: Former Cuban leader Fidel Castro dies Castro jumps from a tank in April 1961 as he arrives at Giron, Cuba, near the Bay of Pigs. That month, a group of about 1,300 Cuban exiles, armed with US weapons, made an unsuccessful attempt to overthrow Castro. Hide Caption 12 of 37 Photos: Former Cuban leader Fidel Castro dies Castro announces general mobilization after the announcement of the Cuban blockade by President John F Kennedy in October 1962. Hide Caption 13 of 37 Photos: Former Cuban leader Fidel Castro dies Castro raises arms with Soviet leader Nikita Khrushchev during a four-week visit to Moscow in May 1963. Hide Caption 14 of 37 Photos: Former Cuban leader Fidel Castro dies Castro in July 1964. Hide Caption 15 of 37 Photos: Former Cuban leader Fidel Castro dies Castro plays baseball in 1964. Hide Caption 16 of 37 Photos: Former Cuban leader Fidel Castro dies Castro addresses thousands of Cubans in Havana in 1968. Hide Caption 17 of 37 Photos: Former Cuban leader Fidel Castro dies In 1977, Castro uses a map as he describes the 1961 Bay of Pigs invasion to ABC correspondent Barbara Walters. Hide Caption 18 of 37 Photos: Former Cuban leader Fidel Castro dies Iraq's Saddam Hussein, center, with the Castro brothers during a visit to Cuba in January 1979. Hide Caption 19 of 37 Photos: Former Cuban leader Fidel Castro dies Castro greets Soviet leader Mikhail Gorbachev in Havana in April 1989. Hide Caption 20 of 37 Photos: Former Cuban leader Fidel Castro dies Castro visits Paris in March 1995. Hide Caption 21 of 37 Photos: Former Cuban leader Fidel Castro dies Castro meets with Pope John Paul II on an airport tarmac in Havana in January 1998. It was the first papal visit to Cuba. Hide Caption 22 of 37 Photos: Former Cuban leader Fidel Castro dies Castro puts his arm around South African President Nelson Mandela in May 1998 with Italian Prime Minister Romano Prodi, left, and Brazilian President Fernando Henrique Cardoso. They were in Geneva, Switzerland, for a conference of the World Trade Organization. Hide Caption 23 of 37 Photos: Former Cuban leader Fidel Castro dies Castro welcomes Russian President Vladimir Putin to Cuba in December 2000. Putin was the first Russian President to visit Cuba since the fall of the Berlin Wall. Hide Caption 24 of 37 Photos: Former Cuban leader Fidel Castro dies Castro is helped by aides after he appeared to faint while giving a speech in Cotorro, Cuba, in June 2001. He returned to the podium less than 10 minutes later to assure the audience he was fine and that he just needed to get some sleep. Hide Caption 25 of 37 Photos: Former Cuban leader Fidel Castro dies In July 2001, Castro talks with Elian Gonzalez, the young boy who was the focus of a bitter international custody dispute a couple of years earlier. Hide Caption 26 of 37 Photos: Former Cuban leader Fidel Castro dies Castro and former US President Jimmy Carter listen to the US national anthem after Carter arrived in Havana for a visit in May 2002. Hide Caption 27 of 37 Photos: Former Cuban leader Fidel Castro dies Castro at the May Day commemoration of Revolution Square in Havana in 2004. He held tightly to his belief in a socialist economic model and one-party Communist rule, even after the Soviet Union's end and most of the rest of the world concluded state socialism was an idea whose time had passed. Hide Caption 28 of 37 Photos: Former Cuban leader Fidel Castro dies Castro, left, and his brother Raul attend a session of the Cuban parliament in July 2004. Hide Caption 29 of 37 Photos: Former Cuban leader Fidel Castro dies Castro speaks in Havana in February 2006. Hide Caption 30 of 37 Photos: Former Cuban leader Fidel Castro dies Castro in Havana in September 2002. Several surgeries forced him to relinquish his duties temporarily to younger brother Raul in July 2006. Hide Caption 31 of 37 Photos: Former Cuban leader Fidel Castro dies In footage from state-owned Cuban television, Venezuelan President Hugo Chavez visits an ailing Castro in September 2006. That July, it was announced that Castro was undergoing intestinal surgery. Castro resigned as President in February 2008, and his brother Raul took over permanently. Hide Caption 32 of 37 Photos: Former Cuban leader Fidel Castro dies Castro smiles before delivering a speech in Havana in September 2010. He had remained mostly out of sight after falling ill in 2006 but returned to the public light that year. Hide Caption 33 of 37 Photos: Former Cuban leader Fidel Castro dies Pope Benedict XVI meets with Castro in Havana in March 2012. Hide Caption 34 of 37 Photos: Former Cuban leader Fidel Castro dies In this picture provided by CubaDebate, Castro talks to Randy Perdomo, president of Cuba's University Students Federation, during a February meeting in Havana. Hide Caption 35 of 37 Photos: Former Cuban leader Fidel Castro dies Castro visits with 19 cheese masters on Friday, July 3, 2015, in a rare trip outside his Havana home. Hide Caption 36 of 37 Photos: Former Cuban leader Fidel Castro dies Leader of the Russian Orthodox Church, Patriarch Kirill, left, visits with Fidel Castro during a meeting at Castro's home on February 14, 2016. Hide Caption 37 of 37

Castro lived long enough to see a historic thaw in relations between Cuba and the United States. The two nations re-established diplomatic relations in July 2015, and President Barack Obama visited the island this year.

President Raul Castro -- who took over from his ailing brother more than eight years ago -- announced that breakthrough to the nation but observers noted Fidel's silence on the matter.

Castro's stage was a small island nation 90 miles from the United States, but he commanded worldwide attention.

Cuban President Fidel Castro during the May Day celebration in 2004.

"He was a historic figure way out of proportion to the national base in which he operated," said noted Cuba scholar Louis A. Perez Jr., author of more than 10 books on the Caribbean island and its history.

"Cuba hadn't counted for much in the scale of politics and history until Castro," said Wayne Smith, the top US diplomat in Cuba from 1979 to 1982.

Castro became famous enough that he could be identified by only one name. A mention of "Fidel" left little doubt who was being talked about.

Castro and the road to power

It was a bearded 32-year-old Castro and a small band of rough-looking revolutionaries who overthrew an unpopular dictator in 1959 and rode their jeeps and tanks into Havana, the nation's capital.

The primary leader of the Cuban Revolution, Castro left his mark on the Cold War era.

They were met by thousands upon thousands of Cubans fed up with the brutal dictatorship of Fulgencio Batista and who believed in Castro's promise of democracy and an end to repression.

That promise would soon be betrayed, though, and Castro held on to power for 47 years until an intestinal illness that required several surgeries forced him to relinquish his duties temporarily to younger brother Raul in July 2006. Castro resigned as president in February 2008, and Raul took over permanently.

One Castro or another has ruled Cuba over a period that spans almost 60 years and 11 US presidents. Fidel Castro outlived six of those presidents, including Cold War warriors John F. Kennedy, Richard Nixon and Ronald Reagan.

At the height of the Cold War, Castro used a blend of charisma and repression to install the first and only communist government in the Western Hemisphere, less than 100 miles from the United States.

Cuba and the Soviet Union established diplomatic relations on May 8, 1960, further eroding the relationship with the United States. Castro, who had long blamed many of Cuba's ills on American influence and resented the US role in hemispheric politics, quickly intensified cooperation with the Soviet Union, which began sending large subsidies.

"Fidel Castro came to power with a conviction that he was going to have a major revolution in Cuba, that he was going to stay in power indefinitely, that he was going to fight American imperialism and that he needed a 'daddy' and his 'daddy' was the Soviet Union," said Jaime Suchlicki, director of the Institute for Cuban and Cuban-American Studies at the University of Miami.

'Taunted, antagonized and irritated'

In doing so, Castro defied a hostile US policy that sought to topple him with a punishing trade embargo that started in 1962 and continued for the rest of his life.

"He taunted, antagonized and irritated the United States for more than a half century," said Dan Erikson, a senior adviser for Western Hemisphere affairs at the US State Department and author of "The Cuba Wars: Fidel Castro, the United States and the Next Revolution."

JUST WATCHED The life of Fidel Castro Replay More Videos ... MUST WATCH The life of Fidel Castro 04:15

Castro also survived numerous assassination attempts by the CIA and anti-Castro exiles in the early 1960s. He took delight in pointing out how none of them succeeded, not even the plot that called for explosives to be placed in the ubiquitous cigars he later would quit smoking for health reasons.

"I have never been afraid of death," Castro said in 2002. "I have never been concerned about death."

Until his last breath, Castro held tightly to his belief in a socialist economic model and one-party Communist rule, even after the Soviet Union disintegrated and most of the rest of the world concluded state socialism was an idea whose time had passed.

"The most vulnerable part of his persona as a politician is precisely his continued defense of a totalitarian model that is the main cause of the hardships, the misery and the unhappiness of the Cuban people," said Elizardo Sanchez, a human rights advocate and critic of the Castro regime.

But Castro's defenders in Cuba point to what they see as social progress, including racial integration, universal education and health care. Instead of blaming an inept socialist system, they fault the US embargo for the country's economic woes.

"What Fidel achieved in the social order of this country has not been achieved by any poor nation, and even by many rich countries, despite being submitted to enormous pressures," said Jose Ramon Fernandez, a former Cuban vice president.

Cuban exiles

Castro's political staying power was a source of puzzling consternation and bitter frustration for Cuban exiles, who never imagined he would rule so long.

Cuban exiles in Miami protest the move to normalize US-Cuba relations.

"We came here with a round-trip ticket ... because we thought the revolution was going to last days," said US Rep. Ileana Ros-Lehtinen, who arrived in Florida as a child and later became the first Cuban-American elected to Congress. "And the days turned into weeks, and the weeks to months, and the months to years."

Castro occasionally allowed disenchanted Cubans to leave, with most going to the United States. More than 260,000 Cubans left in a US-organized airlift between 1965 and 1973. In 1980, Castro let another 125,000 leave in the chaotic Mariel boatlift. Among them were criminals released from Cuban jails who brought a violent crime wave to Florida.

At other times, desperate Cubans fled the island nation in makeshift boats across the treacherous Straits of Florida. Thousands died from drowning or exposure to the brutal Caribbean sun.

The center of the exile community is Miami, where the Cuban American National Foundation became a powerful lobbying group courted by US politicians. For decades, pressure and political donations from the exile community have thwarted any efforts to lift the embargo.

The early years

Castro was born August 13, 1926, in Oriente Province in eastern Cuba. His father, Angel, was a wealthy landowner originally from Spain. His mother, Lina, had been a maid to Angel's first wife.

Educated in private Jesuit schools, Castro went on to earn a law degree from the University of Havana in 1950 and became a practicing attorney, offering free legal services to the poor.

Castro announces a general mobilization after the blockade by President John F. Kennedy in 1962.

In 1952, at the age of 25, he ran for the Cuban congress. But just before the election, the government was overthrown by Batista, who established the dictatorship that put Castro on the road to revolution.

On July 26, 1953, Castro led a group of about 150 rebels who attacked the Moncada military barracks in Santiago in an unsuccessful attempt to overthrow Batista. Most of the attackers were killed. Castro and a handful of others were captured.

The attack made him famous throughout Cuba, but it also earned him a 15-year prison sentence.

At his sentencing, Castro told the court, "Condemn me, it doesn't matter. History will absolve me."

He was released in 1955 as part of an amnesty for political prisoners and lived in exile in the United States and Mexico, where he organized a guerrilla group with brother Raul and Ernesto "Che" Guevara, an Argentine doctor-turned-revolutionary. They named themselves the July 26 Movement, after the date of the failed Moncada attack.

In 1956, Castro and a few dozen rebels headed for Cuba aboard an old yacht called the Granma. Off course and long overdue, they beached the craft off the coast of Oriente Province.

Batista's soldiers were waiting for them, and, again, most of Castro's followers were killed.

The Castro brothers, Guevara and a handful of other survivors fled into the Sierra Maestra mountains along the nation's southeastern coast, where they waged their guerrilla campaign against Batista.

Relations quickly fell apart

While the United States quickly recognized the new government when Castro came to power on January 1, 1959, tensions arose after Cuba began nationalizing factories and plantations owned by American companies. In January 1961, Washington broke off diplomatic relations.

Crowds cheer Castro on his victorious march to Havana after ousting dictator Fulgencio Batista.

Less than four months later, a group of CIA-trained Cuban exiles, armed with US weapons, landed at the Bay of Pigs in Cuba in an attempt to overthrow Castro. The invasion failed miserably, with many of the exile fighters killed or captured.

The United States later paid $53 million worth of food and medicine in exchange for more than 1,100 prisoners.

Two weeks after the Bay of Pigs, Castro formally declared Cuba a socialist state.

In October 1962, the United States and the Soviet Union came to the brink of nuclear war over Soviet nuclear missiles installed in Cuba. President John F. Kennedy demanded that the Soviets remove the weapons, and he established a naval blockade around the island. In the end, the Soviet Union backed down and removed the missiles.

Cuba, which had struggled economically despite the Soviet subsidies, underwent even more severe hardships starting in 1991 after the collapse of the Soviet Union. By some accounts, imports and exports dropped by 80%, and the gross domestic product, a measure of the goods and services the nation produced, fell by more than 30%. This Special Period in Time of Peace, as the Cubans called it, lasted through the decade, and Cuba continued to struggle well into the 21st century.

A private life kept private

Not much is known about Castro's private life, which he guarded steadfastly.

Before he came to power, Castro married Mirta Diaz-Balart, the daughter of an established and politically connected Cuban family, in 1948. They had a son the next year and named him Fidel.

His wife filed for divorce in 1954 and won custody of young Fidelito, as he was known.

Castro is reported to have fathered 10 children with six women. His second wife, Dalia Soto del Valle, is the mother of five of his eight sons. Seven of his 10 children have names that begin with the letter A.

Toward the end of his life, Castro grew visibly weaker, spurring speculation about his health. He fainted while speaking at a rally in June 2001 and injured himself when he fell after a speech in late 2004.

He remained mostly out of sight after falling ill in 2006 but returned to the public light in the summer of 2010, making a series of appearances and even giving a short speech to a special session of the National Assembly that he convened. In January 2014, photos showed a frail and hollow-eyed Castro hunched over a cane and supported by an aide as he toured an art studio opening in Havana.

A divisive figure in life, Castro will likely remain so for many years after his passing.

"The legacy of Fidel Castro will not really be known until 50 years after his death," said Cuba scholar Perez.

Ann Louise Bardach, author of the 2009 book "Without Fidel: A Death Foretold in Miami, Havana, and Washington," spent more than two decades following and writing about the Castros and Cuban politics.

"The possible aspects of his legacy," she said, "will likely be nationalism, a sense of Cuban identity -- of 'cubanidad.' But at a price far too steep that will leave a debt for generations to come."

Erikson, the State Department official, noted Castro's shortcomings.

"He really was the main proponent of the Cuban Revolution," Erikson said, "but he failed to deliver on his promises."

Assessing a mixed legacy

Castro clearly left behind a different Cuba, many observers say, but not necessarily a better one.

"You could say that one positive legacy is that there are a lot of educated Cubans," said Adriana Bosch, a Cuban-born filmmaker who lives in the United States and produced a documentary on Castro for PBS. "But if you don't create the economic conditions where those people can work and make contributions, what you have is a bunch of educated waiters and waitresses, which is what you have in Cuba now."

Photos: Reaction to Fidel Castro's death Members of the Cuban community in the Little Havana area in Miami react to the death of Fidel Castro on Saturday, November 26. Castro, who led a rebel army to improbable victory in Cuba, embraced Soviet-style communism and defied the power of US presidents during his half-century rule, died at age 90. Hide Caption 1 of 20 Photos: Reaction to Fidel Castro's death Rafaela Vargas mourns the death of former President Fidel Castro at the entrance of her home in the Vedado neighborhood in Havana, Cuba, on Saturday, November 26. Hide Caption 2 of 20 Photos: Reaction to Fidel Castro's death Cuban students chant slogans and carry a wreath as they mourn the death of revolution leader Fidel Castro, at the University of Havana, on November 26, 2016, in Havana. Hide Caption 3 of 20 Photos: Reaction to Fidel Castro's death A member of the Cuban community in the Little Havana area in Miami reacts to the death of Fidel Castro. Hide Caption 4 of 20 Photos: Reaction to Fidel Castro's death People gather outside the Cuban Embassy in Santiago, Chile. One of the world's longest-serving rulers and most singular characters, Castro defied 11 US administrations and hundreds of assassination attempts. Hide Caption 5 of 20 Photos: Reaction to Fidel Castro's death People take to the streets to react to the news of the death of former Cuban President Fidel Castro outside the restaurant Versailles in Miami. Hide Caption 6 of 20 Photos: Reaction to Fidel Castro's death Women cry outside Cuba's embassy in Buenos Aires, Argentina, after the announcement of the death of Fidel Castro. Hide Caption 7 of 20 Photos: Reaction to Fidel Castro's death Cuban-Americans react to the death of Fidel Castro in the Little Havana area in Miami. Hide Caption 8 of 20 Photos: Reaction to Fidel Castro's death Flowers, candles and a Cuban cigar are laid out in Moscow in memory of former Cuban President Fidel Castro. Hide Caption 9 of 20 Photos: Reaction to Fidel Castro's death Cuban-Americans take to the streets of Miami's Little Havana neighborhood early Saturday, November 26, upon hearing the news of longtime Cuban leader Fidel Castro's death. Castro died at age 90 after ruling the island nation with an iron hand for nearly half a century. Hide Caption 10 of 20 Photos: Reaction to Fidel Castro's death Cuban-Americans celebrate in Miami's Little Havana, the center of the Cuban exile community in the United States. Hide Caption 11 of 20 Photos: Reaction to Fidel Castro's death Celebrations continue into the early morning November 26 in Miami's Little Havana neighborhood. Few who came to the United States in the late '50s and early '60s believed Castro would hang on to power for so long, only ceding the presidency to his brother Raul in recent years. Hide Caption 12 of 20 Photos: Reaction to Fidel Castro's death Members of Communist Party of India march as part of a remembrance rally in Chennai on November 26, 2016. Hide Caption 13 of 20 Photos: Reaction to Fidel Castro's death People celebrate the death of Cuban leader Fidel Castro in Miami, on Saturday, November 26, 2016. Castro, who led a rebel army to improbable victory, embraced Soviet-style communism and defied the power of 10 US presidents during his half century rule of Cuba, has died at age 90. Hide Caption 14 of 20 Photos: Reaction to Fidel Castro's death The mood seems somber in Havana on November 26 as Cubans react to the announcement of the revolutionary leader's death. Hide Caption 15 of 20 Photos: Reaction to Fidel Castro's death A man places flowers at the Cuban Embassy in Moscow in memory of Castro on November 26. Russian President Vladimir Putin called the Cuban leader "a sincere and reliable friend of Russia." Hide Caption 16 of 20 Photos: Reaction to Fidel Castro's death Those out on the streets of Miami include Cuban-Americans of all ages. Some Cuban exiles have waited years to mark this moment. Hide Caption 17 of 20 Photos: Reaction to Fidel Castro's death The streets are quiet in the Cuban capital on November 26 following the announcement of Castro's death the evening before on national TV. Hide Caption 18 of 20 Photos: Reaction to Fidel Castro's death People gather at an office of the Popular Assembly in Havana in front of a picture of the iconic leader on November 26 after President Raul Castro announced his brother's death on television. Hide Caption 19 of 20 Photos: Reaction to Fidel Castro's death A sign that reads, "Long live Fidel," stands on a government building in Havana early November 26. Hide Caption 20 of 20

The enduring legacy, Castro's critics say, is a society in disarray.

"Cuba is a country divided, a country where you have 2 million people in exile, a country that is economically wrecked, a country that is ecologically wrecked, a country that is probably without a lot of civic values, and a country that is facing a very uncertain future," Bosch said.

"Many of the decisions that have been taken by the leadership and by Fidel Castro were not necessarily the decisions that were best for the revolution, but were decisions geared to keeping him in power," Lisandro Perez, a Cuba expert at Florida International University, told CNN.

In the end, Castro's declaration decades ago that history would issue the final verdict was accurate. Time will tell, but at the end of his long life, it appeared he would not be absolved.