Spain is a constitutional monarchy located in southwestern Europe. It occupies most (about. 85 percent) of the Iberian Peninsula and includes a small exclave inside France called Llívia as well as the Balearic Islands in the Mediterranean, the Canary Islands in the Western Atlantic Ocean 108 km (67 mi) off northwest Africa, and five places of sovereignty (plazas de soberanía) on and off the coast of Morocco: Ceuta, Melilla, Islas Chafarinas, Peñón de Alhucemas, and Peñón de Vélez de la Gomera.
The Spanish mainland is bordered to the south and east almost entirely by the Mediterranean Sea (except for a small land boundary with Gibraltar); to the north by France, Andorra, and the Bay of Biscay; and to the west by the Atlantic Ocean and Portugal. With an area of 504,030 km², Spain is the second largest country in Western Europe (behind France) and with an average altitude of 650 m, the second highest country in Europe (behind Switzerland).
Its total area is 504,782 km2 (194,897 sq mi) of which 499,542 km2 (192,874 sq mi) is land and 5,240 km2 (2,023 sq mi) is water. Spain lies between latitudes 26° and 44° N, and longitudes 19° W and 5° E. Its Atlantic coast is 710 km (441 mi) long. The Pyrenees mountain range, extends 435 km (270 mi) from the Mediterranean to the Bay of Biscay. In the extreme south of Spain lie the Straits of Gibraltar, which separate Spain and the rest of Europe from Ceuta and Morocco in north Africa; at its narrowest extent, Spain and Morocco are separated by only 13 km (8.1 mi).
Spain (i/ˈspeɪn/ SPAYN; Spanish: España, pronounced: [esˈpaɲa] ( listen)), officially the Kingdom of Spain (Spanish: Reino de España), is a sovereign state and a member of the European Union located in southwestern Europe on the Iberian Peninsula. Its mainland is bordered to the south and east by the Mediterranean Sea except for a small land boundary with the British Overseas Territory of Gibraltar; to the north and north east by France, Andorra, and the Bay of Biscay; and to the northwest and west by the Atlantic Ocean and Portugal.
Spanish territory also includes the Balearic Islands in the Mediterranean, the Canary Islands in the Atlantic Ocean off the African coast, and two autonomous cities in North Africa, Ceuta and Melilla, that border Morocco. Furthermore, the town of Llívia is a Spanish exclave situated inside French territory. With an area of 504,030 square kilometres (194,610 sq mi), it is the second largest country in Western Europe and the European Union after France, and the fourth largest country in Europe after Russia, Ukraine and France.