Spain officially the Kingdom of Spain is a sovereign state and a member state of the European Union. It is located on the Iberian Peninsula in southwestern Europe. 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 north east by France, Andorra, and the Bay of Biscay; and to the west and northwest by Portugal and the Atlantic Ocean. It is one of three countries (Morocco, France) to have both Atlantic and Mediterranean coastlines. Spain's 1,214 km border with Portugal is the longest uninterrupted border within the European Union.