Spanish American wars of independence important change in strategy after three United Provinces campaigns had been defeated in Upper Peru. San Martín's army became the nucleus of the Army of the Andes, which received crucial political and material support in 1816 when Juan Martín de Pueyrredón became Supreme Director of the United Provinces. In January 1817, San Martín was finally ready to advance against the royalists in Chile. Ignoring an injunction from the congress of the Río de la Plata not to move against Chile, San Martín together with General Bernardo O'Higgins Riquelme, later Supreme Director of Chile, led the Army over the Andes in
Battle of Ochomogo Battle of Ochomogo The Battle of Ochomogo (5 April 1823) was fought in Ochomogo, to the west of Cartago, Costa Rica, shortly after the country became independent from Spain. Republican militia from San José and Alajuela led by Gregorio José Ramírez defeated conservative forces from Cartago, the capital, who supported making Costa Rica part of the new Mexican Empire. The Republicans won and San José became capital of the country, which remained independent within the Federal Republic of Central America. Cartago was the first Spanish settlement in Costa Rica, founded in 1563 by Juan Vázquez de Coronado. It was the