Spain is a country located in southwestern Europe occupying most (about 82 percent) of the Iberian Peninsula. It also includes a small exclave inside France called Llívia, as well as the Balearic Islands in the Mediterranean, the Canary Islands in the Atlantic Ocean 108 km (67 mi) off northwest Africa, and five places of sovereignty (plazas de soberanía) on and off the coast of North Africa: 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 the small British territory of Gibraltar); to the north by France, Andorra, and the Bay of Biscay; and to the west by the Atlantic Ocean and Portugal. With a land area of 504,782 square kilometres (194,897 sq mi) in the Iberian Peninsula, Spain is the largest country in Southern Europe, the second largest country in Western Europe (behind France), and the fourth largest country in the European continent (behind Russia, Ukraine, and France). It has an average altitude of 650 m.