Fruitless negotiations continued between the governments of Bogotá and Quito, where the government of Bogotá did not recognize the separation of Ecuador or that of Cauca from the Gran Colombia until war broke out in May 1832. In five months, New Granada defeated Ecuador due to the fact that the majority of the Ecuadorian Armed Forces were composed of rebellious angry unpaid veterans from Venezuela and Colombia that did not want to fight against their fellow countrymen. Seeing that his officers were rebelling, mutinying, and changing sides, President Flores had no option but to reluctantly make peace with New Granada. The Treaty of Pasto of 1832 was signed by which the Department of Cauca was turned over to New Granada (modern Colombia), the government of Bogotá recognized Ecuador as an independent country and the border was to follow the Ley de División Territorial de la República de Colombia (Law of the Division of Territory of the Gran Colombia) passed on June 25, 1824. This law set the border at the river Carchi and the eastern border that stretched to Brazil at the Caquetá river. Later, Ecuador contended that the Republic of Colombia, while reorganizing its government, unlawfully made its eastern border provisional and that Colombia extended its claims south to the Napo River because it said that the Government of Popayán extended its control all the way to the Napo River.