In the 19th century, Nicaragua was beset by political problems, allowing William Walker, an American Southerner seeking to establish English-speaking slavery states in Latin America, to ascend to the Nicaraguan presidency. Walker believed in the doctrine of manifest destiny, and established himself in Nicaragua in the guise of offering help, but his real intentions were to conquer the five provinces of Central America, a manifesto he entitled, "Five or None." In Costa Rica, Juan Rafael Mora Porras, the President, urged and backed by the British saw peril in the intentions of Walker and on 27 February 1856 declared war on Nicaragua and called all Costa Ricans to join forces and fight, a call that was heeded. They began the march on 4 March from San José to the northern border, led by the president, arriving in Liberia on 12 March, where they joined the battalion organized there (Moracia Battalion), under the leadership of José María Cañas. When the filibusters of the Nicaraguan movement realized what was happening in Costa Rica, they organized a battalion numbering about 240 men, two of which four companies consisted entirely of French the one and the other of German troops, under the leadership of Colonel Schlessinger, which entered Costa Rica through the road that joined Nicaragua with Liberia and which passed by the Hacienda Santa Rosa, where they arrived exhausted by the long and weary march on the 20th March late at night. The Costa Ricans, meanwhile, began the walk to Santa Rosa and on 20 March at 4 o'clock, armed with rifles, sabres, and bayonets, began the attack, surrounded the troublemakers who not having posted proper sentry were taken by surprise after having stationed themselves in the casona and in the corrals. Under the sudden attack the German company had broke and left the field, while the French under Capt. Legeay also retired from the broken ground they had attempted to occupy. In five minutes, the whole command was in disarray in full and disorderly retreat; in fourteen minutes the Costa Ricans had won the battle. Walker's troops suffered 59 dead and the Costa Ricans 20.
The Santa Rosa's Casona, one of the few historical sites, was burned down in May 2001 and later re-built.