Toward the end of the 19th century, the government in Santiago consolidated its position in the south by the Occupation of Araucanía. The Boundary treaty of 1881 between Chile and Argentina confirmed Chilean sovereignty over the Strait of Magellan. As a result of the War of the Pacific with Peru and Bolivia (1879–83), Chile expanded its territory northward by almost one-third, eliminating Bolivia's access to the Pacific, and acquired valuable nitrate deposits, the exploitation of which led to an era of national affluence. Chile had joined the stand as one of the high-income countries in South America by 1870.