Iquique is a port city and commune in northern Chile, capital of both the Iquique Province and Tarapacá Region. It lies on the Pacific coast, west of the Pampa del Tamarugal, which is part of the Atacama Desert. It had a population of 191,468 according to the 2017 census. It is also the main commune of Greater Iquique. The city developed during the heyday of the saltpetre mining in the Atacama Desert in the 19th century. Once a Peruvian city with a large Chilean population, it was conquered by Chile in the War of the Pacific (1879–1883). Today it is one of only two free ports of Chile, the other one being Punta Arenas, in the country's far south.