Borders of Time

North America and the Caribbean

The history of Costa Rica

The whole story, from the first peoples to today, with every state that has held San José on our historical maps.

Key dates (14)
  1. c. 10000 BCEHunter-gatherers using Clovis-type spear points camp in the Turrialba valley.
  2. c. 700 CEThe Diquís culture of the south begins carving the great stone spheres of the Diquís delta.
  3. 1502Christopher Columbus anchors off the Caribbean coast on his fourth voyage.
  4. 1563Juan Vázquez de Coronado founds Cartago, the colonial capital.
  5. 1709Pablo Presbere leads a rising of the Talamanca peoples against Spanish rule.
  6. 1821Costa Rica accepts the independence of Central America from Spain.
  7. 1823Republicans defeat supporters of union with Mexico at Ochomogo, and the capital moves to San José.
  8. 1838Costa Rica leaves the Federal Republic of Central America.
  9. 1856Costa Rican forces defeat William Walker's filibusters at Santa Rosa and Rivas.
  10. 1890The railway from San José to the Caribbean port of Limón is completed.
  11. 1948José Figueres wins a 44-day civil war and the junta abolishes the army.
  12. 1949A new constitution confirms the abolition of the armed forces.
  13. 1987President Óscar Arias receives the Nobel Peace Prize for the Central American peace plan.
  14. 2026Laura Fernández is elected president in the first round and her party wins a legislative majority.
Hear the whole article read aloud

Costa Rica lies on the narrow isthmus between Nicaragua and Panama, where the cultures of Mesoamerica met those of the Chibchan-speaking peoples of lower Central America and Colombia. Its Indigenous chiefdoms built stone causeways and carved great stone spheres, but were devastated by Spanish conquest and disease in the sixteenth century, leaving a small, poor colony of farmers on the margins of the Spanish Empire. After independence in 1821 coffee made the country prosperous and bananas brought foreign companies and Caribbean migrants. Since a brief civil war in 1948, after which the army was abolished, Costa Rica has been the most stable democracy in Central America.

The first peoples

The oldest traces of people in Costa Rica are stone tools from the Turrialba valley, including Clovis-type spear points like those of North America and point styles linked to South America, left by hunters who pursued giant sloths, mastodons and other large animals around 10,000 BCE. As the big game died out, people turned to smaller animals and wild plants. Farming of roots and tubers was under way by about 5,000 years ago, pottery appeared between about 3000 and 2000 BCE, and by the first millennium BCE there were settled villages growing maize, beans, squash and cassava.

Archaeologists describe the region as part of the Intermediate or Isthmo-Colombian Area, a zone between the great civilisations to the north and south. The north-west, around the Nicoya peninsula and Guanacaste, was the southern frontier of Mesoamerica. Its peoples, among them the Chorotega who arrived from the north in the centuries before the conquest, carved jade ornaments, made fine painted pottery, used a calendar and traded with the wider Mesoamerican world of the Maya and the peoples of Mexico. The centre, the Caribbean slope and the south belonged instead to Chibchan-speaking peoples related to those of Panama and Colombia, organised in chiefdoms ruled by hereditary leaders.

On the slopes of the Turrialba volcano, the site of Guayabo, occupied for well over a thousand years, has stone-lined mounds, paved causeways, aqueducts and water tanks that once supported a sizeable town. In the south, the Diquís culture, which flourished from about 700 CE until the conquest, produced superb gold work cast in the shapes of frogs, birds and jaguars, and carved hundreds of almost perfectly round stone spheres, some more than two metres across, which were set out in alignments near chiefly settlements. Their purpose is still debated, and the settlements were listed as a UNESCO World Heritage Site in 2014. When the Spanish arrived, perhaps twenty distinct societies, together numbering in the hundreds of thousands, lived in the territory.

Conquest and the Spanish province

Christopher Columbus anchored off the Caribbean coast, near today's Limón, in September 1502 during his fourth and last voyage, and saw people wearing gold ornaments. The name Costa Rica, rich coast, came from such reports, though the gold proved to be traded and worked rather than mined in quantity. In 1522 Gil González Dávila led an expedition along the Pacific side, collecting gold from local chiefs by gift and by force. The conquest of the Nicoya region in the 1520s was accompanied by mass enslavement: thousands of Indigenous people were shipped to Panama and Peru. The first settlement in the interior, Villa de Bruselas, founded in 1524, did not survive.

The central highlands were finally conquered in the 1560s. Juan de Cavallón entered the Central Valley in 1561, and his successor Juan Vázquez de Coronado founded Cartago in 1563 as capital of the province. Conquest, forced labour, warfare, relocation and above all epidemics of smallpox, measles and other diseases were catastrophic: the Indigenous population, estimated at about 120,000 in 1569, had fallen to around 10,000 by 1611. The peoples of Talamanca in the south-east, protected by mountains and forest, resisted for much longer. In 1709 the Bribri and Cabécar leader Pablo Presbere led a rising that destroyed the Spanish missions there; he was captured and executed in Cartago in 1710, and the region stayed largely outside Spanish control for the rest of the colonial period.

Within the Spanish Empire, Costa Rica was the southernmost province of the Captaincy General of Guatemala, itself nominally part of the Viceroyalty of New Spain. Far from Guatemala City, forbidden to trade legally with neighbouring Panama, and with no silver mines and few Indigenous labourers left to exploit, it attracted few settlers. A governor described it in 1719 as the poorest and most miserable Spanish colony in all America. Most colonists farmed their own small holdings in the Central Valley, growing maize, wheat and tobacco and raising cattle, while cacao plantations on the Caribbean coast near Matina used enslaved Africans and were raided by Miskito and British privateers. Heredia, San José and Alajuela grew up in the eighteenth century around new parishes. Many historians have traced the country's later egalitarian traditions to this society of small farmers, although others caution that colonial Costa Rica had its own sharp hierarchies of race and wealth.

Independence and the coffee republic

The collapse of Spanish authority after Napoleon's invasion of Spain in 1808 and the Spanish American wars of independence reached Costa Rica without fighting. When Guatemala declared the independence of Central America on 15 September 1821, the news arrived in Cartago in October, and the provincial authorities accepted it. Opinion divided over whether to join Agustín de Iturbide's Mexican Empire, which Mexico had proclaimed: Cartago and Heredia were for union, San José and Alajuela for a republic. In the brief civil war of 1823 the republicans won at Ochomogo and the capital moved to San José. Costa Rica then joined the Federal Republic of Central America, and in 1824 the district of Nicoya, formerly governed from Nicaragua, voted to join it, giving the country the province of Guanacaste.

The federation was torn apart by civil wars, and Costa Rica left it in 1838. The authoritarian Braulio Carrillo, who dominated the country from 1835 to 1842, built a strong central state and was overthrown by the former federal president Francisco Morazán, who was himself executed in San José in 1842 after trying to use Costa Rica as a base to restore the union. A republic was formally proclaimed in 1848.

Coffee, first planted in 1808, was the making of the country. The government gave land to anyone who would grow it, and from the 1840s, when a British merchant opened a direct route to London, coffee carried by ox cart to the Pacific port of Puntarenas transformed the Central Valley. A wealthy class of coffee growers and exporters came to dominate politics, while the bulk of production stayed in the hands of small and medium farmers.

The war against Walker

In 1855 the American adventurer William Walker, invited into a Nicaraguan civil war by one faction, seized control of Nicaragua with a small army of filibusters, declared himself president and later legalised slavery. Fearing Costa Rica would be next, President Juan Rafael Mora declared war in March 1856. Costa Rican troops defeated a filibuster force at Santa Rosa in Guanacaste on 20 March and then attacked Walker at Rivas in Nicaragua on 11 April, where a young drummer from Alajuela, Juan Santamaría, was killed setting fire to the filibusters' stronghold; he became the national hero. The army brought home cholera, which killed perhaps a tenth of the population. With El Salvador, Honduras and Guatemala, Costa Rica fought on until Walker surrendered in May 1857. Mora was overthrown in 1859 and shot after a failed attempt to return in 1860.

Railways, bananas and liberal reform

General Tomás Guardia seized power in 1870 and ruled until 1882. His 1871 constitution, with amendments, lasted until 1949; he abolished the death penalty in 1882 and launched the railway to the Caribbean. The American contractor Minor C. Keith completed the line from San José to Limón in 1890, at a great cost in lives from disease. Thousands of labourers were brought in, especially from Jamaica, as well as from China and Italy, and their descendants form the Afro-Caribbean, English-speaking community of Limón, who were long denied full citizenship and restricted in where they could live until the reforms after 1948. Keith was paid in land along the line, on which he planted bananas, and in 1899 his business became part of the United Fruit Company, which came to dominate the Caribbean coast.

Liberal governments of the late nineteenth century made primary education free and compulsory in 1869 and separated church and state. The election of 1889, when the government accepted the victory of an opposition candidate after crowds took to the streets, is often celebrated as the start of Costa Rican democracy, though elections remained indirect, limited to men and often marred by fraud for decades. The country's main break from constitutional rule came in 1917, when the war minister Federico Tinoco seized power; his dictatorship, which the United States refused to recognise, fell in 1919 amid popular protest, and the army's prestige never recovered.

Social reform and the 1948 civil war

The Great Depression cut coffee and banana prices and brought labour unrest; a great strike by banana workers in 1934, led by the Communist Party, won improved conditions from United Fruit. President Rafael Ángel Calderón Guardia, elected in 1940, allied with the Catholic Church and the Communists to pass a far-reaching social programme: the University of Costa Rica in 1940, a social security fund in 1941, constitutional social guarantees and a labour code in 1943. During the Second World War his government declared war on the Axis and interned German residents. Opponents accused the Calderonistas of corruption and electoral fraud.

In the election of February 1948 the opposition candidate Otilio Ulate defeated Calderón, but the government-dominated Congress annulled the result on 1 March. José Figueres Ferrer, a coffee farmer and businessman who had been exiled by Calderón, launched an armed uprising from his farm in the southern mountains. In 44 days of fighting his rebels defeated the small army and the Communist militias that supported the government; about 2,000 people died, the bloodiest conflict in the country's modern history. Figueres ruled for eighteen months at the head of a junta that nationalised the banks, gave women and Black Costa Ricans full political rights, and on 1 December 1948 abolished the army. A constituent assembly wrote the 1949 constitution, which kept Calderón's social reforms, confirmed the abolition of the military and created an independent electoral tribunal, and the junta handed power to Ulate in November 1949.

The Second Republic

Figueres founded the National Liberation Party and won the presidency in 1953, and from 1958 power alternated peacefully between his party and its opponents in elections every four years. Money that had gone to the army went into schools, health care, electricity and roads, and Costa Rica built some of the best social indicators in Latin America. It joined the Central American Common Market in 1963. Relations with Cuba were broken off in the early 1960s and not restored until 2009.

The oil shocks and collapse of coffee prices of the late 1970s brought a debt crisis in the early 1980s, followed by structural adjustment and a shift towards new exports, tourism and, from the 1990s, high-technology manufacturing. During the Cold War conflicts of the 1980s, Costa Rica was pressed by the United States to support the Contra rebels fighting Nicaragua's Sandinista government from its territory; President Luis Alberto Monge proclaimed the country's neutrality in 1983. His successor Óscar Arias drew up the Esquipulas peace plan, signed by the Central American presidents in 1987, which helped end the region's civil wars and won him the Nobel Peace Prize that year. Large national parks created from the 1970s made Costa Rica a leader in conservation and ecotourism, and forest cover, heavily cut for cattle ranching, recovered strongly.

Costa Rica since 2000

The traditional two-party system weakened in the early 2000s after corruption cases against former presidents. A free trade agreement with the United States and Central America was approved in a referendum in 2007, and in the same year Costa Rica switched diplomatic recognition from Taiwan to the People's Republic of China. Laura Chinchilla became the first woman president in 2010. A long-running border dispute with Nicaragua over the San Juan river and the wetlands of Isla Portillos went to the International Court of Justice, which upheld Costa Rica's sovereignty over the disputed territory in 2015.

In the 2020s violence linked to drug trafficking rose to record levels and became the public's main concern. Rodrigo Chaves, an economist from outside the traditional parties, won the presidency in 2022 and clashed repeatedly with the courts, the legislature and the electoral tribunal. In the general election of 1 February 2026 Laura Fernández of the Sovereign People's Party, who campaigned on his popularity and on a hard line against crime, won the presidency in the first round with about 48.5 percent of the vote, and her party won 31 of the 57 seats in the Legislative Assembly, the first single-party majority since 1990. She took office on 8 May 2026 as the country's second woman president.

Who held San José?

9 periods

The state drawn at the site of today’s capital on each of our maps. Open any year to see the borders of the time.

  1. 2000 BCE – 1500 BCEMesoamerican hunter-gatherers and maïze farmersMap of 2000 BCE →
  2. 1500 BCE – 323 BCEMaize farmersMap of 1500 BCE →
  3. 323 BCE – 1492 CENo state drawn here on the mapMap of 323 BCE →
  4. 1492 CE – 1500 CEHuetarMap of 1492 CE →
  5. 1500 CE – 1530 CENo state drawn here on the mapMap of 1500 CE →
  6. 1530 CE – 1650 CEViceroyalty of New SpainMap of 1530 CE →
  7. 1650 CE – 1715 CEViceroyalty of New Spainunder Spanish HabsburgMap of 1650 CE →
  8. 1715 CE – 1878 CEViceroyalty of New Spainunder SpainMap of 1715 CE →
  9. 1878 CE – todayCosta RicaMap of 1878 CE →

Visit today

See Costa Rica for yourself

Guided tours, museum and monument tickets, and day trips across Costa Rica, from the capital to the historic sites.

Tours and tickets in Costa Rica

On GetYourGuide. We may earn a commission if you book. See our disclosure.

Costa Rica elsewhere on the site

Other countries
Nicaragua