The considerable distance and poor communication routes between Guatemala City and the Central Plateau, where most of the Costa Rican population lived then and still lives now, meant the local population had little allegiance to the federal government in Guatemala.From colonial times to now, Costa Rica's reluctance to become economically tied with the rest of Central America has been a major obstacle to efforts for greater regional integration.
The impact of indigenous peoples on modern Costa Rican culture has been relatively small compared to other nations, since the country lacked a strong native civilization to begin with.
Most of the native population was absorbed into the Spanish-speaking colonial society through inter-marriage, except for some small remnants, the most significant of which are the Bribri and Boruca tribes who still inhabit the mountains of the Cordillera de Talamanca, in the southeastern part of Costa Rica, near the frontier with Panama.
The name la costa rica, Spanish for "rich coast", was in some accounts first applied by Christopher Columbus, who sailed to the eastern shores of Costa Rica during his final voyage in 1502, During most of the colonial period, Costa Rica was the southernmost province of the Captaincy General of Guatemala, nominally part of the Viceroyalty of New Spain.
In practice, the captaincy general was a largely autonomous entity within the Spanish Empire.
Agriculture became evident in the populations that lived in Costa Rica about 5,000 years ago. For the first and second millennia BCE there were already settled farming communities.
These were small and scattered, although the transition from hunting and gathering to agriculture as the main livelihood in the territory is still unknown.
Because of the lack of agreement on these two possible outcomes, the first civil war of Costa Rica occurred.
The Battle of Ochomogo took place on the Hill of Ochomogo, located in the Central Valley in 1823.
It was not long before Spanish settlers turned to the hills, where they found rich volcanic soil and a milder climate than that of the lowlands.