Chile won the war and with the Treaty of Ancón of 1884, the War of the Pacific ended. Chile obtained half of Peru's guano income from the 1880s and its guano islands, with Chile taking control over the most valuable nitrogen resources in the world. Chile's national treasury would increase 900% from 1879 to 1902 due to the newly acquired lands. Meanwhile, Peru's reliance on commodity exports – which continued through its history – resulted the bankruptcy of its economy. Peru would go on to approve the Grace Contract, which granted ownership of Peru's railroads to holders of sovereign debt, with the Peruvian government not issuing new sovereign debt until 1906.
