The military campaign for the independence of the Presidencia de Quito could be said to have begun on October 9, 1820, when the port-city of
Guayaquil proclaimed its independence from Spanish rule after a quick and almost bloodless revolt against the local colonial garrison. The leaders of the movement, a combination of Venezuelan and Peruvian pro-independence officers from the colonial army, along with local intellectuals and patriots, set up a governing council and raised a military force with the purpose of defending the city and carrying the independence movement to the other provinces in the country.
By that time, the tide of the wars of independence in
South America had turned decisively against Spain: Simón Bolívar's victory at the
Battle of Boyacá (August 7, 1819) had sealed the independence of the former
Viceroyalty of Nueva Granada, while to the south,
José de San Martín, having landed with his army on the Peruvian coast in September 1820, was preparing the campaign for the independence of the
Viceroyalty of Perú.