The Ecuadorian War of Independence, part of the Spanish American wars of independence of the early 19th century, was fought from 1820 to 1822 between Spain and several South American armies over control of the Royal Audience 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.
