 Flores crossed the border, leading to the December 6, 1863, Battle of Cuaspad, in which some 4,000 Colombians under Mosquera utterly defeated the invaders, about 1,500 of whom were killed or wounded and 2,000 were taken captive.Mosquera subsequently brought his army into Ecuadorian territory, reaching the town of Ibarra without encountering any resistance, but the two sides then agreed to an armistice.Subsequent negotiations led to the Treaty of Pinsaqui, signed December 30, 1863, in which the two sides agreed to a return to the prewar status quo.