On July 28, 1821, Peruvian independence was proclaimed in Lima by the Liberator San Martin, and Tumbes and Jaen, which were included as part of the revolution of Trujillo by the Peruvian occupying force, had the whole region swear allegiance to the new Peruvian flag and incorporated itself into Peru, even though Peru was not completely liberated from Spain. After Peru was completely liberated from Spain by the patriot armies led by Bolivar and Antonio Jose de Sucre at the Battle of Ayacucho dated December 9, 1824, there was a strong desire by some Peruvians to resurrect the Inca Empire and to include Bolivia and Ecuador. One of these Peruvian Generals was the Ecuadorian-born José de La Mar, who became one of Peru's presidents after Bolivar resigned as dictator of Peru and returned to Colombia. Gran Colombia had always protested Peru for the return of Jaen and Tumbes for almost a decade, then finally Bolivar after long and futile discussion over the return of Jaen, Tumbes, and part of Mainas, declared war. President and General José de La Mar, who was born in Ecuador, believing his opportunity had come to annex the District of Ecuador to Peru, personally, with a Peruvian force, invaded and occupied Guayaquil and a few cities in the Loja region of southern Ecuador on November 28, 1828.