Ecuadorian War of Independence

The Ecuadorian War of Independence, part of the Spanish American wars of independence of the early 19th century, was fought from 1809 to 1822 between Spain and several South American armies over control of the Real Audiencia of Quito, a Spanish colonial jurisdiction which later became the modern Republic of Ecuador. The war ended with the defeat of the Spanish forces at the Battle of Pichincha on May 24, 1822, which brought about the independence of all the lands of the Real Audiencia of Quito.

Beginning of the war
The military campaign for the independence of the territory now known as Ecuador began after nearly three hundred years of Spanish colonization. Ecuador's capital, Quito, was a city of around ten thousand inhabitants. There, on August 10, 1809, came one of the first calls in Latin America for independence from Spain, led by the city's criollos, including Carlos de Montúfar and Bishop José Cuero y Caicedo. The short-lived State of Quito was suppressed by Juan de Sámano in the Battle of Ibarra (1812).

For the next 7 years, Ecuador remained firmly under Spanish control, until the wars of independence in South America turned decisively against them, when Simón Bolívar's victory at the Battle of Boyacá on August 7, 1819 sealed the independence of the former Viceroyalty of New Granada. To the south, José de San Martín landed the Liberating Expedition of Peru on the Peruvian coast on September 8, 1820, which with the blockade of the ports of Callao and Guayaquil by Lord Thomas Cochrane since September 1819, finally obtained the independence of the Viceroyalty of Perú, the center of Spanish power in South America.

On October 9, 1820, the port city of Guayaquil, part of the Viceroyalty of Peru, proclaimed its independence after a brief and almost bloodless revolt against the local garrison. The leaders of the movement, Peruvian pro-independence officers from the colonial army led by colonel Gregorio Escobedo, second in command of the garrison, and Ecuadorian intellectuals and patriots summoned by José Joaquín de Olmedo, set up a Junta de Gobierno with a military force to defend the city and carry the independence movement to the other provinces of the country.

News of Guayaquil's proclamation of independence spread rapidly to other cities in the Presidencia, and several quickly followed its example. Portoviejo declared its independence on October 18, 1820, and Cuenca—the economic center of the southern highlands—did the same on November 3, 1820.

Junta de Guayaquil on the offensive
The military unit raised and financed in the Free Province of Guayaquil was named Division Protectora de Quito ("Division for the Protection of Quito"). It was to advance on the cities of Guaranda and Ambato in the central highlands, hoping to bring them into the independence movement, and cut all road communication between Quito and Guayaquil and Cuenca, forestalling any Royalist countermove from the north.

The division, under the command of Venezuelan colonels Luis Urdaneta and León de Febres-Cordero, ringleaders of the revolt in Guayaquil, advanced out of the coastal plain towards the highlands, and by November 7, was ready to march into the Andes mountains. On November 9, 1820 the first clash at Camino Real with a Royalist force was a success, through a strategic mountain pass on the road from Guayaquil to Guaranda. This victory opened the way into the inter-Andean highlands, and the capture of Guaranda soon followed. News of the presence of the patriot army in Guaranda had the intended effect: many of the towns in the highlands proclaimed their independence. Latacunga and Riobamba did so on November 11, and Ambato on November 12, 1820. By the middle of November, Spanish control of the Presidencia had been reduced to Quito and its surrounding areas in the northern highlands. It looked as if the liberation of the entire territory would be easier than expected.

Spain strikes back
Hopes for a quick victory were short-lived. Field-Marshal Melchor Aymerich, acting President and supreme commander of Royalist forces in Quito, sent around 5,000 troops south under veteran Spanish colonel Francisco González to deal with the 2,000-man patriot army in Ambato. Severely defeated in the Battle of Huachi on November 22, 1820, Urdaneta's force fell back, badly mauled, to Babahoyo on the coastal plains.

Authorities in Guayaquil, who on November 11, 1820, had issued a decree creating the Provincia Libre de Guayaquil (Free Province of Guayaquil), desperately organized a ragtag detachment of the survivors of Huachi plus some reinforcements (300 men altogether, including some 50 cavalry), and ordering it to make a final stand at Babahoyo. As the Royalist army did not seem inclined to come down to the plains to meet them, the patriots sent guerrilla bands into the highlands, which were ambushed and massacred January 4 1821, at the Battle of Tanizagua. The guerrillas' commanding officer, Spanish-born colonel Gabriel García Gomez, taken prisoner, was executed by firing squad and decapitated, with his head sent to Quito to be displayed to the population. Thus ended the attempt of the Junta de Guayaquil to achieve the independence of the Presidencia de Quito, amid total military failure and Royalist reprisals on the civilian population of the highland cities.

Sucre arrives
Yet help was on the way. By February 1821, the help requested by the Junta de Guayaquil in October finally materialized in the form of General Antonio José de Sucre, sent by General Simón Bolívar, president of Gran Colombia, who embarked from Panama to Guayaquil. Even more welcome perhaps were the weapons Sucre brought with him: 1,000 muskets, 50,000 musket rounds, 8,000 flints, 500 sabers, and 100 pairs of pistols. Sucre's instructions were clear: "To liberate the capital city of Quito, whose taking will bring about the liberation of the whole Department", as the first step towards later securing the complete independence of Perú. Bolívar also informed the Junta de Guayaquil that they would begin a simultaneous campaign from both the north and south of Quito.

Second Battle of Huachi
In July 1821, Sucre was deploying his army in Babahoyo, ready to advance on the highlands as soon as the weather allowed. Aymerich acted to preempt him with a pincer movement: he would led his army from Guaranda down to Babahoyo, while Colonel González, came from the southern highlands down to Yaguachi to attack Sucre's flank. Thanks to a well-developed espionage network, Sucre was apprised of Aymerich's intentions, and sent General José Mires to deal with González. The encounter ended with the destruction of Gonzalez's force near the town of Cone on August 19, 1821. Upon receiving word of the defeat, Aymerich headed back to the highlands. Sucre followed, his main force occupying Guaranda on September 2, 1821.

Aymerich moved to block any further progress, and in the Second Battle of Huachi on September 12, 1821, annihilated Sucre's infantry. The patriot forces lost 800 men, mostly killed, plus 50 prisoners, among them General Mires. As the battle had also taken a heavy toll on the Royalists, Aymerich decided against exploiting his victory by advancing into the coastal plains. On November 19, 1821, the parties signed a 90-day armistice at Babahoyo, ending Sucre's ill-fated first attempt to liberate Quito.

Battle of Pichincha
With Sucre's casualties, he was not going to be able to get the royalists out of Quito. But as promised by José de San Martín, reinforcements from Peru helped Guayaquil, a Peruvian division of 1,500 men, including three cavalry squadrons and one artillery regiment under Alto-Peruvian Colonel Andrés de Santa Cruz departed from Paita and Trujillo in December 1821.

With these reinforcements Sucre began a new campaign in January 1822 to completely remove the royalist forces from the provinces of Quito and Guayaquil. The decisive battle took place on May 24, 1822, on the slopes of the Pichincha volcano, near Quito in what is now Ecuador, and was a total victory for the Patriots. The next day, Sucre and his army entered the city of Quito, where he accepted the surrender of all the Spanish forces in the Real Audiencia of Quito.

Pasto Campaign
In the meantime, Simón Bolívar and his army had also started marching south from Bogota on 13 December 1821. His goal was to open the land route between Bogotá and Quito, by conquering the fiercely Royalist region around San Juan de Pasto. After the hard-fought Battle of Bomboná on April 7 and El Peñol on April 20, Bolívar triumphantly entered Pasto on June 8, 1822 and accepted the capitulation of the local Spanish troops.

Nevertheless, the area remained unsettled. A first rebellion under command of Benito Remigio Boves between october and December 1822, ended with the Navidad Negra massacre in San Juan de Pasto. A second rebellion between June 1823 and June 1824 under command of Agustín Agualongo was crushed after the Second Battle of Ibarra (Ecuador), and the execution of Agualongo on 13 July 1824.