The Kingdom of Spain is a country and member state of the EU 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 Gibraltar; to the north 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 km², it is the second largest country in Western Europe and the European Union after France.
The Pyrenees mountain range extends 435 km 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 Morocco in north Africa; at its narrowest extent, Spain and Morocco are separated by only 13 km.