The legal situation concerning Gibraltar was settled in 1713 by the Treaty of Utrecht, in which Spain ceded the territory in perpetuity to the British Crown stating that, should the British abandon this post, it would be offered to Spain first. Since the 1940s Spain has called for the return of Gibraltar. The overwhelming majority of Gibraltarians strongly oppose this, along with any proposal of shared sovereignty. UN resolutions call on the United Kingdom and Spain to reach an agreement over the status of Gibraltar.