The Second Battle of Rivas occurred on 11 April 1856 between Costa Rican militia under General Juan Rafael Mora Porras and the Nicaraguan forces of American mercenary William Walker. The lesser known First Battle of Rivas took place on the 29 June 1855 between Walker's forces and the forces of the Chamorro government of Nicaragua.
Among the casualties was Charles Wilkins Webber, an American journalist and explorer serving in Walker's forces, whom some scholars suggest inspired the antagonist in Cormac McCarthy's novel Blood Meridian.
Background
thumb|200px|Ships from [[New York (state)|New York would enter the San Juan River from the Atlantic and sail across Lake Nicaragua. People and goods would then be transported by stagecoach over a narrow strip of land near the city of Rivas, before reaching the Pacific]]At the time, a major trade route between New York City and San Francisco ran through southern Nicaragua. Ships from New York would enter the San Juan River from the Atlantic and sail across Lake Nicaragua.
People and goods were transported by stagecoach over a narrow strip of land near the city of Rivas, before reaching the Pacific, where they were shipped to San Francisco. The commercial rights to this route had been granted by a previous Nicaraguan administration to Wall Street tycoon Cornelius Vanderbilt's Accessory Transit Company. However, Garrison and Morgan had wrested control of the company from Vanderbilt and subsequently supported Walker's expedition. In response, Vanderbilt spread rumors that the company was issuing stock illegally, aiming to depress its value and ultimately regain controlling interest.
In July 1856, Walker declared himself president of Nicaragua, after conducting a farcical election. As ruler, he revoked the Transit Company's charter, alleging that it had violated the agreement, and reinstated the route's use to Garrison and Morgan. This move outraged Vanderbilt, who successfully pressured the U.S. government to withdraw its recognition of Walker's regime. Walker further alarmed neighboring countries and American and European investors with plans for additional military campaigns in Central America. In response, Vanderbilt financed and trained a military coalition of Central American states led by Costa Rica, while also working to cut off Walker's access to men and supplies. Additionally, Vanderbilt offered payments and free passage back to the U.S. to defectors from Walker's army.
Realising that his position was becoming precarious, Walker sought support from the Southerners in the U.S. by reframing his campaign as a fight to spread the institution of black slavery, which many American Southern businessmen viewed as foundational to their agrarian economy. To align with this goal, Walker revoked Nicaragua's emancipation edict of 1824. This move did increase Walker's popularity in the South and drew the attention of Pierre Soulé, an influential New Orleans politician, who worked to rally support for Walker's campaign. However, Walker's army, weakened by an epidemic of cholera and widespread defections, proved no match for the Central American Coalition and the efforts of Vanderbilt's agents.
Costa Rican President Juan Rafael Mora observed with growing concern as Walker consolidated his forces and power in Nicaragua. Fearing that Walker would become unstoppable, and with the backing of Vanderbilt's business empire, Mora declared war not on Nicaragua but specifically on Walker and his filibusters on March 1, 1856. Having long warned about the threat posed by the filibusters, Mora made this declaration in a famous speech that began with the words, "Countrymen, take your weapons, the time that I've been warning you has arrived" ]]
According to the traditional account, on April 11, Salvadoran General José María Cañas suggested that one of the soldiers advance towards the hostel with a torch and set it on fire. Some soldiers tried and failed, but Juan Santamaría finally volunteered on the condition that in the event of his death, someone would look after his mother. He then advanced and was mortally wounded by enemy fire. Before expiring he succeeded, however, in setting fire to the hostel, thus contributing decisively to the Costa Rican victory at Rivas, as the enemy then retreated.
Francisca ("Pancha") Carrasco
Carrasco who was serving the militia as a cook and impromptu medic, filled her apron pockets with bullets, grabbed a discarded rifle and shamed some of the retreating Costa Ricans forestalling what might have become a rout.
Juan Alfaro Ruiz
Juan Alfaro Ruiz was responsible for clearing the filibusters from the church. He died of cholera after the battle. One of Alajuela's cantons was named after him.
Aftermath
Walker and his surviving soldiers fled to Granada during the night. Several factions within the Costa Rican Army pushed to pursue and eliminate Walker, hoping to end the war decisively. However, President Mora called off the plan, recognizing that his troops were already exhausted from the fighting. Mora chose to focus his resources on burying the dead and caring for the wounded and sick. Despite Costa Rica's victory in the Battle of Rivas, the country was unable to celebrate its success. The bodies of those killed in the battle had been thrown into the city's wells, triggering a devastating cholera outbreak.
