Ecuadorian War of Independence

The Ecuadorian War of Independence was fought from 1820 to 1822 when Ecuador fought for its independence from the Spanish Empire during the South American Wars of Liberation.

History
On 9 October 1820, during the greater South American Wars of Liberation, the port-city of Guayaquil proclaimed its independence after an almost bloodless revolt against the local Spanish garrison. The patriots set up a junta and raised a military force to defend the city, and several towns followed Guayaquil's example in quick succession. On 9 November 1820, the Ecuadorian patriots won their first victory over the Spanish royalists at Camino Real, and the patriots went on to capture Guaranda. By mid-November, the Spanish rule over Ecuador had been reduced to Quito and the surrounding areas in the northern highlands. However, the Spanish commander Melchior Aymerich took swift action, and his royalist army defeated the patriots at Huachi on 22 November 1820 before advancing south on Cuenca and retaking all the major towns along the way. On 20 December 1820, Cuenca was retaken by the Royalist army. By the year's end, the junta's efforts to overthrow the Real Audiencia of Quito had failed.

However, in February 1821, the Venezuelan liberator Simon Bolivar sent reinforcements to the Patriot forces and aid in the liberation of Quito. His general Antonio Jose de Sucre deployed the army around Babahoyo in July 1821, but his first attempt to liberate Quito failed after Aymerich's army mauled his army at Huachi; Aymerich's army also suffered heavy losses, so he signed a 90-day armistice at Babahoyo on 19 November 1821. However, Sucre decided to try again in 1822, this time attempting an indirect approach to Quito. Sucre was reinforced by Argentinian, Peruvian, and Chilean forces, and, on 24 May 1822, his army defeated Aymerich's army on the slopes of the Pichincha volcano next to the city of Quito. The defeat of the Royalist forces brought about the liberation of Quito, and Aymerich's surrender led to the liberation of Ecuador from Spanish rule.