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
Republic of Texas by the Spanish governor, Manuel María de Salcedo. Their victory at the Battle of Rosillo Creek convinced Salcedo to surrender on April 1, 1813; he was executed two days later. On April 6, 1813, the victorious Republican Army of the North drafted a constitution and declared the independent Republic of Texas, with Gutiérrez as its president. Soon disillusioned with the Mexican leadership, the Americans under Kemper returned to the United States. The ephemeral Republic of Texas came to an end following the August 18, 1813 Battle of Medina, where the Spanish Army crushed the Republican Army of the North. The