El Salvador is a mining town in the commune of Diego de Almagro, Chañaral Province, Atacama Region, Chile. Located at an elevation of more than 2,400 meters in the foothills of the Andes and in the middle of the Atacama Desert, it has a population of approximately 7,000 inhabitants. At its peak, El Salvador once had a population of 24,000 inhabitants.
El Salvador's economy is entirely based on copper mining. The Atacameños extracted copper from this area for more than a thousand years. Nevertheless, it was American explorations in the 1950s that revealed the presence of ore that could be exploited in an industrial scale. Anaconda Copper Mining Company was concerned about declining reserves in its Potrerillos mine and it sent prospectors in search of a new Chilean ore body in 1951. Working under the auspices Anaconda's Andes Mining subsidiary, the mineralization was discovered in 1954 and mapped in 1955.
As a remote discovery, Anaconda had to build El Salvador as a self-contained and self-sustaining town. It was complete with housing, schools, stores, water and electrical plants and a railway. The mine opened in 1959. The architect in charge of designing the city was Raymond Olson, who worked at the Anaconda headquarters in New York City.
The town was designed in the shape of a Roman helmet. Legend has it that an executive of Anaconda Mining Company travelled to the proposed town site with his son. The boy had with him his beloved toy; a Roman helmet, which he lost in the desert. Years later once the city was built he was flown over the town and his father said “Remember the toy helmet you lost as a young boy, look down son there it is 
Key dates for the foundation of El Salvador, are: 23 April 1959, on this date the first load of ore was crushed, in less than three months on 2 July, the first bar of Copper arrived in New York. The town itself was inaugurated on 28 November 1959.
In 1971, after nationalization of copper under the government of Salvador Allende, Codelco Chile took over operation of the El Salvador mine.
In 2004, according to official numbers, a total of 74,874 tons metric of fine copper were produced, employing 1,727 people. Nevertheless, since 2001, and in spite of sustained increases in the international price of copper, the mine has experienced losses of more than 3.4 million dollars. In addition, a study by the Australian consultant Goldberg, determined that only 243 million tons of copper remain in the mine, which assures mineral for only a few years. On July 29, 2005 Codelco announced the planned closure of the mine beginning in 2008. Beginning in that year oxide production will cease, and later, sulfide production from the underground mine. It is expected that the townsite will be closed in the 2011.
The Salvador Solar Park is located approximately 5 kilometres south of El Salvador. This 70 MW facility was commissioned in November 2014.
El Salvador is represented by Cobresal in the Chilean Football League. Its stadium, Copper Stadium, was inaugurated in 1980. After expansion to accommodate spectators when Cobresal successfully competed in the Chilean League's Premier B finals in 1983, it had a total capacity of 20,752 spectators, that is to say, almost three times the population of the town.