The formal layout of the Franco-Spanish border dates back to the signing of the Treaty of the Pyrenees between the kingdoms of Spain and France in 1659. This would be followed by the Treaty of Llivia the following year, which transferred to France the sovereignty of several villages in the valley of Querol.