Coordinates: 40°N 4°W / 40°N 4°W
Spain (i; Spanish: España [esˈpaɲa]), officially the Kingdom of Spain (Spanish: Reino de España), is a sovereign state largely located on the Iberian Peninsula in southwestern Europe, with archipelagos in the Atlantic Ocean and Mediterranean Sea, and several small territories on and near the north African coast. Its mainland is bordered to the south and east by the Mediterranean Sea except for a small land boundary with Gibraltar; to the north and northeast by France, Andorra, and the Bay of Biscay; and to the west and northwest by Portugal and the Atlantic Ocean. Along with France and Morocco, it is one of only three countries to have both Atlantic and Mediterranean coastlines. Extending to 1,214 km (754 mi), the Portugal–Spain border is the longest uninterrupted border within the European Union.
Spanish territory includes two archipelagos: the Balearic Islands, in the Mediterranean Sea, and the Canary Islands, in the Atlantic Ocean off the African coast. It also includes two major exclaves, Ceuta and Melilla, in continental North Africa; and the islands and peñones (rocks) of Alborán, Alhucemas, Chafarinas and Vélez de la Gomera. With an area of 505,990 km2 (195,360 sq mi), Spain is the second largest country in Western Europe and the European Union, and the fourth largest country in Europe. By population, Spain is the sixth largest in Europe and the fifth in the European Union.