The battle was fought on the outskirts of the city of Guayaquil, Ecuador on September 22–24, 1860, among several factions claiming control of the country in the wake of the abdication of president Francisco Robles, amidst continuous Peruvian military pressure due to the ongoing Ecuadorian–Peruvian territorial dispute.
After a series of internal problems and diplomatic issues with Peru, Ecuadorian president Francisco Robles resigned from his post on May 1, 1859, leaving control of the country split among a number of Jefaturas Supremas (Supreme Commands).
Ecuadorian statesman Gabriel García Moreno created a provisional government seated in Quito, while General Franco declared himself Supreme Chief of Guayas.
Peruvian President Castilla, intending to take advantage of the leadership crisis to broker a favorable territorial deal, commanded a Naval force that blockaded the Gulf of Guayaquil.
Failing to reach an agreement with García Moreno, Castilla met with Franco and signed the Treaty of Mapasingue, recognizing all disputed territories as belonging to Peru.
[3] With his side prevailing, García Moreno restored peace to the country, and ushered in what would later be looked on as the era of Conservatism, the establishment of authoritarian, if not frankly dictatorial, regime that outlived him by twenty years, until 1895.
Peruvian President Ramón Castilla sailed to Guayaquil with several thousand soldiers in October 1859, and negotiated the Treaty of Mapasingue with General Franco in January 1860.
In an unsuccessful attempt to seek a powerful ally, García Moreno sent a series of secret[7] letters to the chargé d'affaires of France, Emile Trinité, on December 7, 15 and 21, 1859; in them, he proposed that Ecuador become a protectorate of the European country.
[2] On August 7, 1860, a small group of soldiers led by General Francisco Javier Salazar ambushed Guillermo Franco's forces at the future site of the city of Babahoyo, capital of the province of Los Ríos.
[8] On the night of September 22, a part of the provisional government's army, led by Colonel José de Veintemilla, attacked the city from the north, while the bulk of Gabriel García Moreno's and Flores' forces approached from another direction, through swampland.