By 1859 the nation was on the brink of anarchy and was marked by the Ecuadorian–Peruvian War of 1857–1860