The Republic

By 1848 Costa Rica´s economical activity was centered on agriculture with coffee being its main export product. In that year, the Republic of Costa Rica is declared by Dr. Jose Maria Castro Madriz, giving way to form of government based on a strong central government and to a new administrative division (Provinces, Counties and Districts).

In 1856 the country has to face the menace of a group of filibusters lead by William Walker which tried to occupy the country. The invaders were fist defeated in March in the Battle of Santa Rosa (in Guanacaste) and a bigger victory was achieved in the battle of Rivas (Nicaragua) on April 11, where Juan Santamaria (the National Heroe) died while burning a building where the enemy was stationed.