The origins of the dispute came from the borders established in the Spanish empire that just defined the Atacama desert as the northern border of the General Captaincy of Chile. Bolivian and Chilean historians disagree on whether the territory of Charcas, originally part of the Viceroyalty of Peru, later of the Viceroyalty of the Río de la Plata and ultimately of Bolivia, included access to the sea. Supporting their claims with different documents, Bolivians claim that it did while Chileans disagree. When Simón Bolívar established Bolivia as a nation in 1825, he claimed access to the sea, disregarding overlapping claims by Chile, which had gained independence 7 years before.