It also defied predictions that it would not survive the collapse of its one-time supporter, the Soviet Union.
Since the fall of the US-backed dictatorship of Fulgencio Batista in 1959, Cuba has been a one-party state led by Mr Castro and - since February 2008 - by his chosen successor and younger brother, Raul.
Fidel Castro exercised control over virtually all aspects of Cuban life through the Communist Party and its affiliated mass organisations, the government bureaucracy and the state security apparatus.
Exploiting the Cold War, Fidel Castro was for decades able to rely on strong Soviet backing, including annual subsidies worth $4-5 billion, and succeed in building reputable health and education systems. But, at least partly because of the US trade sanctions, he failed to diversify the economy.
The US and Cuba agreed in 2014 to normalise relations.
Population 11.2 million
Area 110,860 sq km (42,803 sq miles)
Major language Spanish
Major religion Christianity
Life expectancy 77 years (men), 81 years (women)
Currency Cuban peso
Raul Castro, the world's longest-serving defence minister, took over as president in February 2008, succeeding his ailing brother Fidel, who had been in power for five decades.
After being re-elected by the single-party National Assembly in February 2013, Raul announced his intention to stand down at the end of his second term in 2018.
Fidel Castro brought revolution to Cuba in the 1950s and created the western hemisphere's first Communist state. His beard, long speeches, cigar, army fatigues and defiance of the United States earned him iconic status across the globe.
Raul, 76 at the time of this appointment, has been his brother's trusted right-hand man and was once known as an iron-fisted ideologue who executed Fidel Castro's orders - and enemies - ruthlessly.
Under his leadership, Cuba's Revolutionary Armed Forces became one of the most formidable fighting forces in the Third World with combat experience in Africa, where they defeated South Africa's army in Angola in 1987.
The Cuban media are tightly controlled by the government and journalists must operate within the confines of laws against anti-government propaganda and the insulting of officials which carry penalties of up to three years in prison.
Reporters without Borders in early 2016 described Cuba as "one of the world's worst countries from the viewpoint of journalistsâ€¦ independent journalists and bloggers are constantly persecuted by the Castro government".
Some key dates in Cuba's history:
1898 - Cuba is ceded to the US which defeated Spain in war.
1902 - Cuba becomes independent under the protection of the US.
1933 - Sergeant Fulgencio Batista seizes power in a coup.
1959 - Fidel Castro leads a guerrilla army into Havana, forcing Batista to flee.
1961 - US breaks off diplomatic relations in response to the nationalization of US-owned properties, and later imposes a complete commercial embargo.
1961 - Cuban exiles backed by the US try to invade Cuba at the Bay of Pigs, but are defeated.
1962 - The US and the Soviet Union have a showdown that almost touches off war after the US discovers Soviet nuclear missiles on Cuba. The confrontation ends with the Soviets removing the missiles and the US agreeing never to invade Cuba.
1975 - Castro sends troops to Angola to help fight rebels backed by South Africa. It is the start of 15 years of war in which 300,000 Cubans will fight.
1991 - The Soviet Union, Cuba's biggest benefactor, collapses, touching off an economic crisis.
2006 - Fidel Castro provisionally turns over power to brother Raul Castro, who becomes president in 2008.
2014 - US President Barack Obama and President Castro announce moves to normalise diplomatic relations, severed for more than 50 years.
Cuba's Communist government has survived more than 50 years of US sanctions intended to topple veteran leader Fidel Castro.