History of Spain (1810–73) daring march from Venezuela to New Granada (Colombia), he defeated Spanish forces at the Battle of Boyacá in 1819, ending Spanish rule in Colombia. Venezuela was liberated on 24 June 1821 when Bolívar destroyed the Spanish army on the fields of Carabobo on the Battle of Carabobo. Argentina declared its independence in 1816 (though it had been operating with virtual independence as a British client since 1810 after successfully resisting a British invasion). Chile was retaken by Spain in 1814, but lost permanently in 1817 when an army under José de San Martín, crossed the Andes Mountains from Argentina to
Latin American wars of independence movement against their colonial master, finally ended as a full-fledged civil war. Traditionally, the process is divided into three stages: Patria Vieja, Reconquista, and Patria Nueva. The first uprising against Spanish rule took place in 1809, and criollos in Ecuador set up a junta on September 22, 1810 to rule in the name of the Bourbon monarch; but as elsewhere, it allowed assertion of their own power. Only in 1822 did Ecuador fully gain independence and became part of Gran Colombia, from which it withdrew in 1830. At the Battle of Pichincha, near present-day Quito, Ecuador on May 24, 1822,