Costa Rica shares land borders with two countries: Nicaragua to the north and Panama to the south-east. The Nicaraguan boundary runs about 310 kilometres, much of it along the San Juan river; the Panamanian boundary runs about 340 kilometres through the Talamanca mountains. Costa Rica has coasts on both the Caribbean and the Pacific, and it has had no army since 1948 — which makes the way it handles border disputes unusual.
A River Owned by the Other Side
The central peculiarity of Costa Rica's northern border is that the San Juan river is Nicaraguan. Under the Cañas-Jerez Treaty of 1858, the boundary runs along the river's southern bank rather than down the middle, so Nicaragua holds sovereignty over the water itself while Costa Rica holds perpetual rights of navigation for purposes of commerce.
That phrasing — con objetos de comercio in the Spanish text — has been argued over for more than a century, because it can be read as with articles of trade or for purposes of commerce, and the difference determines whether Costa Rican passenger and tourist boats may use the river at all.
The treaty was challenged almost immediately, and in 1888 the two countries asked United States President Grover Cleveland to arbitrate. The Cleveland Award upheld the treaty and confirmed that Costa Rica could not navigate the river with vessels of war.
The World Court, First Visit
Costa Rica took the navigation question to the International Court of Justice, which ruled in July 2009. The judgment held that Costa Rica's navigation rights cover the transport of passengers, including tourists, for commercial purposes — a substantial win, since river tourism matters to the border communities.
It also held that Costa Rican police vessels may not navigate the river, that Nicaragua may require boats to stop for identification and may impose reasonable regulation, and that riparian residents on the Costa Rican bank have a customary right to fish for subsistence.
It was a carefully split decision, and both states claimed victory. What it did not settle was where exactly the border ran at the river's mouth.
Isla Portillos, and a Dredged Channel
In October 2010 Nicaragua sent personnel and dredging equipment into a wetland area at the mouth of the San Juan on Isla Portillos, cleared a channel through it and raised a flag. Costa Rica, with no army, sent police and went to court.
The episode acquired an odd footnote when a Nicaraguan commander cited an online mapping service as showing the territory as Nicaraguan; the mapping company subsequently corrected the boundary. It is one of the few instances of a mapping error being publicly invoked to justify a territorial incursion.
The International Court of Justice ruled in December 2015 that the disputed territory was Costa Rican, that Nicaragua had violated Costa Rican sovereignty by excavating channels and establishing a presence, and that it must compensate for the environmental damage.
The First Environmental Damages the Court Ever Awarded
In February 2018 the court issued a further judgment quantifying that compensation. It awarded Costa Rica $378,890, of which around $120,000 was for environmental harm — the removal of trees and wetland vegetation and the impairment of ecosystem services.
The sum is small. Its significance is that it was the first time the International Court of Justice had ever awarded compensation for environmental damage, and it established that harm to an ecosystem is compensable in its own right rather than only as lost commercial value. It is now cited routinely in environmental litigation far from Central America.
Nicaragua paid. A country with no army had used the court three times in a decade and had the boundary confirmed each time.
No Army Since 1948
Costa Rica abolished its military in 1948, after a short civil war, and wrote the prohibition into the 1949 constitution. Border security is handled by police forces and a coastguard, and the money that would have gone to defence went into education and health.
This has consequences for how it manages neighbours. It cannot answer an incursion with force, so it answers with lawyers, and it has become one of the most frequent and most successful litigants at the International Court of Justice for a country of its size.
It has also underwritten a diplomatic identity: Óscar Arias won the Nobel Peace Prize in 1987 for the plan that ended the Central American wars, negotiated by the one government in the region with no troops of its own to commit.
Nicaraguan Labour, and a Second Exodus
The northern border is crossed constantly by people rather than boats. Nicaraguans make up a substantial share of Costa Rica's population and a much larger share of its agricultural, construction and domestic workforce; coffee and sugar harvests in particular depend on seasonal labour from across the line.
The flow surged after 2018, when the Nicaraguan government's violent suppression of protests drove tens of thousands to seek asylum. Costa Rica received the largest share, straining an asylum system built for far smaller numbers.
The dynamic resembles the Dominican-Haitian relationship in its economics but differs sharply in its politics: Costa Rica has generally granted legal status rather than denationalising, though the strain has produced its own backlash.
The Panamanian Border, and a War About Coto
The southern boundary was not always settled either. Costa Rica and Panama fought the Coto War in 1921 over a disputed area on the Pacific side, a brief conflict resolved by United States intervention.
The line was finally fixed by the Echandi Montero-Fernández Jaén Treaty of 1941, which both states have observed since. The border today runs through the Talamanca range and reaches the Caribbean near Sixaola and the Pacific near Paso Canoas, which is the main crossing and a substantial informal shopping destination for Costa Ricans seeking cheaper goods.
A Park That Crosses the Line
La Amistad International Park straddles the Panamanian border, a single protected area jointly inscribed by UNESCO and managed by both countries. It covers the highest and wildest part of the Talamanca range, including Cerro Chirripó at 3,820 metres — Costa Rica's highest summit — and holds an exceptional range of habitats from lowland rainforest to páramo above the treeline.
The Costa Rican reserves were inscribed by UNESCO in 1983 and the listing was extended across the border to take in Panama's La Amistad National Park in 1990, which is what turned it into a single transboundary property rather than two adjacent ones. It is among the earliest such sites and remains one of the better-functioning examples, in part because the terrain is so difficult that development pressure is limited on both sides.
The border region is also home to indigenous peoples whose territories predate both states. Ngäbe-Buglé communities move across it seasonally, many travelling from Panama to work the Costa Rican coffee harvest, and their right to cross has required specific administrative arrangements.
A Border That Protects Itself
Costa Rica has protected roughly a quarter of its territory, one of the highest proportions anywhere, and much of that protected land sits along its frontiers. La Amistad straddles the Panamanian border; Guanacaste and Santa Rosa lie near the Nicaraguan one; the Osa Peninsula and Corcovado sit close to the southern coast.
The policy reversed one of the fastest deforestation rates in the world. Forest cover fell to roughly a fifth of the country by the mid-1980s, and a programme of payments for ecosystem services — compensating landowners for keeping forest standing, funded partly by a fuel tax — brought it back above half.
The border consequence is that Costa Rica's frontier zones are largely national parks and biological corridors rather than farmland or settlement. This is convenient for a country without an army: protected areas are patrolled by rangers, they carry little population to defend, and their status makes any incursion an environmental incident with an international audience.
That is precisely how the Isla Portillos case was argued and won. Nicaragua's excavation was characterised not as an invasion but as damage to a wetland protected under the Ramsar Convention, and the compensation the court awarded was for trees and ecosystem services. A state with no soldiers made its border dispute a conservation dispute, and prevailed.
Two Oceans and a Canal Route That Was Not Taken
Costa Rica's Caribbean coast is about 210 kilometres long and its Pacific coast, deeply indented, runs over 1,000. The San Juan river route through Lake Nicaragua was for much of the nineteenth century the leading candidate for an interoceanic canal, and Cornelius Vanderbilt operated a transit line along it during the California gold rush.
Had the canal been built there rather than in Panama, Costa Rica's northern border would have become one of the most strategically important lines in the hemisphere. Nicaragua revived the idea in 2013 with a Chinese-backed concession for a canal that would have crossed near the border; the project collapsed and the concession was repealed in 2024.
Costa Rica objected throughout, on environmental grounds and because the route's northern works would have affected the San Juan. The canal that was never dug is the reason its northern boundary was negotiated so carefully in the first place. A fuller picture is in our Costa Rica country guide, and how many countries are in Central America sets out the region it sits in.
