|Ecuador, officially the Republic of Ecuador, is a country in northwestern South America, bordered by Colombia on the north, Peru on the east and south, and the Pacific Ocean on the west. Ecuador also includes the Galápagos Islands in the Pacific, about 1,000 kilometres (620 mi) west of the mainland. The capital city is Quito, and its largest city as well.|
- Ecuador during its long and turbulent history has lost most of its contested territories to each of its more powerful neighbors, such as Colombia in 1832 and 1916, Brazil in 1904 through a series of peaceful treaties, and Peru after a short war in which the Protocol of Rio de Janeiro was signed in 1942.
- However, Bolívar 's intention was to form a new republic known as the Gran Colombia, out of the liberated Spanish territory of New Granada which consisted of Colombia, Venezuela, and Ecuador. San Martin's plans were thwarted when Bolívar, with the help of Marshal Antonio José de Sucre and the Gran Colombian liberation force, descended from the Andes mountains and occupied Guayaquil; they also annexed the newly liberated Audiencia de Quito to the Republic of Gran Colombia.
- Through protocolized meetings between representatives of Peru and Gran Colombia, the border was set as Tumbes river in the west and in the east the Maranon and Amazon rivers were to be followed toward Brazil as the most natural borders between them.
- However, what was pending was whether the new border around the Jaen region should follow the Chinchipe River or the Huancabamba River. According to the peace negotiations Peru agreed to return Guayaquil, Tumbez, and Jaén; despite this, Peru returned Guayaquil, but failed to return Tumbes and Jaén, alleging that it was not obligated to follow the agreements, since the Gran Colombia ceased to exist when it divided itself into three different nations - Ecuador, Colombia, and Venezuela.
- Seeing that his officers were rebelling, mutinying, and changing sides, President Flores had no option but to reluctantly make peace with New Granada.