In 1814, Antonio José de Sucre joined the fight for South American independence from Spain. The Battle of Pichincha took place on May 24, 1822, on the slopes of the Pichincha volcano, near Quito in what is now Ecuador. The encounter, fought in the context of the Spanish American wars of independence, pitted a Patriot army under Sucre against a Royalist army commanded by Field Marshal Melchor Aymerich. The defeat of the Royalist forces brought about the liberation of Quito and secured the independence of the provinces belonging to the "Real Audiencia de Quito", or "Presidencia de Quito", the Spanish colonial administrative jurisdiction from which the Republic of Ecuador would eventually emerge.