Spain, officially the Kingdom of Spain 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 which Spain lays claim; 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 plus Alborán island, the Chafarinas islands (Islas Chafarinas), Alhucemas island and Perejil (Parsley island). Furthermore, the town of Llívia is a Spanish exclave situated inside French territory. With an area of 505,992 square kilometres (195,365 sq mi), it is the fourth largest country in Europe.
Because of its location, the territory of Spain was subject to many external influences since prehistoric times and through to its dawn as a country. Spain emerged as a unified country in the 15th century, following the marriage of the Catholic Monarchs and the completion of the reconquest, or Reconquista, of the Iberian peninsula in 1492. Conversely, it has been an important source of influence to other regions, chiefly during the modern era, when it became a global empire that has left a legacy of over 500 million Spanish speakers today, making it the world's second most spoken first language.
Spain is a democracy organised in the form of a parliamentary government under a constitutional monarchy. It is a developed country with the twelfth largest economy in the world by nominal GDP, and very high living standards, including the tenth-highest quality of life index rating in the world, as of 2005. It is a member of the United Nations, NATO, OECD, and WTO