Chilean nitrates were the chief source of nitrogen for explosives, fertilizer, and chemical industries from the 1830s to the 1930s, and were the only significant source of iodine from the 1870s (replacing seaweed) until the mid-20th century (when iodine began to be extracted from oilfield brines).
In 1830, a shipment of 700 tonnes of nitrate left Tarapacá, southernmost Peru. The industry mushroomed, and annual exports were 16,000 tonnes by 1843. The peak was not reached until the rather unusual conditions of World War I, when production reached nearly 3 million tonnes. The all-time record was set in 1928, at 3.1 million tonnes.
The nitrates occur in what are now Chile's two northern provinces, Tarapacá and Antofagasta, along a band 30 km wide and 700 km long. They seem to have formed in shallow playa lakes, where the saline water contained bacteria that fixed nitrogen into nitrate.
In 1868 there was a boom in nitrate mining in the Atacama Desert, and major nitrate ports were developed from Iquique in the north through Pisagua and across the Atacama desert to Taltal. The nitrate mining was dominated by British and Chilean enterprises, even though the Atacama Desert was formally part of Bolivia. Chile had recognized Bolivia's title in an 1874 treaty, but was allocated economic rights there, including a guarantee that taxes on Chilean mining enterprises would not be raised.
For Peru, nitrate was rather unimportant as long as the guano trade was flourishing: in fact, most of the early nitrate mining on Peruvian and Bolivian territory was done by Chilean and British entrepreneurs. However, in 1875 a particularly impoverished Peruvian government declared nitrate deposits to be the property of the state, copying the declaration covering guano decades before. By this time the governments of Peru, Bolivia, and Chile, had all focussed their attention on control of the nitrate region.
In another of its economic crises, the Bolivian government announced a tax increase of 10 centavos per hundredweight on nitrates in 1879. At that time the largest nitrate mining company was the Antofagasta Nitrate and Railroad Company, a Chilean firm controlled by British capital, including the merchant house of Gibbs. It's not clear what part was played by Gibbs in the politics of this incident, but the Chileans mobilized with the intention of seizing the desert. The Peruvians expressed the intention of mediating the dispute between Bolivia and Chile, but when it turned out that there was a secret treaty between Peru and Bolivia, the Chileans declared war on them both.
The War of the Pacific may have been started as much by national rivalry and runaway emotion as by the economic prize of the nitrate deposits themselves. However, the nitrate prize was enough to give the victor the income of an entire nation, and the combatants were acutely aware of that. Peru's income had been largely based on guano and nitrate for decades; Bolivia's economy was ramshackle at best, but its foreign income was based on metal mining in the Altiplano; and Chile had already had a taste of the riches to be gained from the Atacama mines it was already operating.
Early in the War, W. R. Grace allied itself with the Peruvian government, and became a clandestine arms shipper to Peru. It bought and shipped millions of dollars' worth of armaments, including guns from Krupp and a new naval weapon, a torpedo boat. However the Chileans quickly beat both their opponents and went on to occupy Lima.
Chile's victory in the War of the Pacific gave it full control of a large northern strip of coast. Iquique was the terminus of the Nitrate Railways and the most important outlet. At first Tarapacá province was dominant, with 48 out of Chile's 53 nitrate works in 1892. But twenty years later the southern fields of Antofagasta, linked by a new railroad, the Longitudinal Railway, overtook the northern field in production.
Nitrate played an increasing role in Chile's economy after the War of the Pacific, as copper production declined. By the late 1880s an export tax on nitrate was earning 43% of Chilean government income, and in 1894 it was 68%, and the wealth was used to improve the country's infrastructure. The nitrate industry, however, was largely foreign owned. European capital had bought out Chilean entrepreneurs in Chile, Peru, and Bolivia, even before the War of the Pacific. The major reason was the large amount of capital needed to set up the nitrate works, the infrastructure in the difficult desert regions that contained the nitrate deposits, and the railroad and port facilities that were needed, and the continuing requirement for importing supplies. Capital on this scale was simply not available in South America, nor were the basic supplies to support the industry. For example, foreign coal constituted 20% of Iquique's imports in 1909. In fact, a convenient two-way trade of coal for nitrate favored British shipping firms, who loaded 60% of the nitrates even though most of the nitrate went to European countries.
Synthetic production of nitrates surpassed Chilean mining production in the 1930s. By 1950 the Chilean production was only about 15% of world supply, and by 1980 it was only 0.14%. Today the Chilean reserves total only about a year's worth of world consumption, not because they are close to exhaustion, but because world demand has increased so much.