The city of Arica used to be located in southern Peru, in the province of the same name, in the Moquegua Department. During the War of the Pacific, Chilean troops invaded the town, and took it from Peruvian control, after which the Treaty of Ancón was signed, granting a large amount of Peruvian territory to Chile, with Arica becoming a commune of the Department of the same name, within the new Province of Tacna. After the Treaty of Lima, the territory was unconditionally given to Chile.