Ochomogo War
The Ochomogo War was a civil war fought in Costa Rica, the first in its history, and was fought shortly after the country became independent from Spain. The most important event was the Battle of Ochomogo (5 April 1823) which was fought on Ochomogo Hill, from which it takes it name, to the west of Cartago, Costa Rica. Republican militia from San José and Alajuela led by Gregorio José Ramírez defeated conservative forces from Cartago, the colonial capital, who supported making Costa Rica part of the new Mexican Empire. The Republicans won the battle and San José became capital of the country, which remained independent within the Federal Republic of Central America. Background
Cartago was the first Spanish settlement in Costa Rica, founded in 1563 by Juan Vázquez de Coronado. It was the original capital of the country. In 1784 the Spanish government gave San José a tobacco factory and a monopoly over tobacco products. After this, San José became the commercial center of Costa Rica while Cartago retained the political power. By 1801 Costa Rica had a population of about 50,000, most of whom lived in the Central Valley. Costa Rica was isolated from the outside world, and it took a  month for news to arrive of the Act of Independence of Central America proclaimed on the 15 September 1821 in Guatemala. In May 1822 Agustín de Iturbide proclaimed himself Emperor of Mexico, with plans to extend his rule to all of Central America. The agrarian and aristocratic landowners of Cartago and Heredia wanted to maintain the privileges they had held under the former Spanish empire. They thought these would be protected under the new Mexican Empire. The liberal merchants of San José and Alajuela wanted to introduce a republican government. They preferred to remain independent of the empire. The leaders of the four towns of the Central Valley met and agreed to remain neutral until the situation became clearer. Gregorio José Ramírez, who had represented the province of Alajuela in the council that decided on the independence of Costa Rica, was hostile to joining the empire. He began to make military preparations. By March 1823 the Superior Governing Council of Costa Rica had still not declared allegiance to the emperor, and the conservatives decided to stage a coup. Preamble

Rafael Francisco Osejo, who had always favored the independence of Costa Rica, was made president of the triumvirate government formed in Cartago in March. This was overthrown by the imperialists after eight days. On 29 March 1823 a group of Cartago residents led by Joaquín de Oreamuno occupied the army barracks and proclaimed that Costa Rica would join the Mexican Empire. Oreamuno said the formal ceremony of allegiance to the empire would take effect on 6 April. The leaders of San José and Alajuela declared war on the imperialists and appointed Ramírez to lead their army  The Republican forces included regular troops and irregulars from San José and Alajuela. The Imperialists had regular troops from Cartago, irregulars from Cartago and Heredia, and Nicaraguans loyal to the emperor. They had artillery they had inherited from Spain, and some cavalry. Battle of Ochomogo
Ramírez sent an ultimatum to the Imperialists on 4 April 1823. The two armies met in the morning of the 5 April at Ochomogo. The Ochomogo Pass is a valley near Cartago that leads through the mountains between San José and Cartago, connecting the Pacific and Atlantic watersheds of the Central Valley. The militia of Cartago under Sergeant Major Salvador de Oreamuno took a stand in the plain. Joaquín de Oreamuno y Muñoz de la Trinidad remained at home in Cartago for the first few hours. The Republicans were under overall command of Ramírez, and the future head of state António Pinto Soares commanded their artillery. There was an attempt to negotiate, but that quickly broke down and both sides began firing their muskets from the cover of the large volcanic rocks that litter the area. The combat was prolonged, and the Cartago forces made several musket and infantry charges, but Pinto Soares' artillery checked them and some of the Cartago officers began to defect, including their commander Salvador de Oreamuno. Sergeant Félix Oreamuno y Jiménez took command and asked for a ceasefire, but Ramírez insisted on unconditional surrender and continued to fight until the forces of Cartago were completely defeated. He then entered Cartago and disarmed the inhabitants. About twenty people died in the one-day battle. Aftermath

While the Ochomogo battle was in progress there was a separate struggle in which the militia of Heredia forced Alajuela to capitulate. Ramírez led his forces from Ochomogo to liberate Alajuela and restore order in the Central Valley. For ten days Ramírez was de facto ruler of the country while he restored order. He published only two decrees, one to make San José the capital and the other to convene a democratically elected governing council. After several weeks news arrived that the First Mexican Empire had ceased to exist on 19 March 1823, so the Battle of Ochomogo had been pointless. In 1825 Juan Mora Fernández was elected the first Costa Rican head of state. Rivalry between the four towns continued, and an 1834 law said the capital was to rotate among them. A year later after the Guerra de la Liga the position of San Jose was confirmed, and this was made official in 1837 by head of state Braulio Carrillo Colina. Notes

Sources

Battles involving Costa Rica
19th century in Costa Rica
Conflicts in 1823