Costa Rica is the second smallest country in Central America after El Salvador. The country lies between Nicaragua and Panama, and has coastlines on the Caribbean and the Pacific. A low, thin line of hills between Lake Nicaragua and the Pacific is prolonged into northern Costa Rica, broadening and rising into high and rugged mountains in the center and south. The capital city, San Jose, lies in a central basin set in these highlands.
Both coasts have lowland areas. The sparsely inhabited east coast has a narrow swamp strip and tropical forests as the terrain slopes inland. The Pacific coast has two peninsulas: the mountainous Nicoya peninsula in the north and the lowland Osa peninsula in the south. A rich lowland savannah patched by deciduous forests stretches along the Pacific coast between the two peninsulas.