Spain, also known as the Kingdom of Spain (Reino de Espaa), is a kingdom in southwestern Europe with territory in the Atlantic and Mediterranean seas. The Iberian Peninsula is home to the majority of Spain's territory, which also includes the Canary Islands in the Atlantic Ocean, the Balearic Islands in the Mediterranean Sea, the autonomous cities of Ceuta and Melilla, and several minor overseas territories scattered along Morocco's Alboran Sea coast. The country's landmass is bound by Gibraltar to the south, the Mediterranean Sea to the south and east, France, Andorra, and the Bay of Biscay to the north, and Portugal and the Atlantic Ocean to the west.
Spain is the biggest nation in Southern Europe, the second-largest country in Western Europe and the European Union, and the fourth-largest country by size on the European continent, with an area of 505,990 km2 (195,360 sq mi). Spain is the sixth-most populated nation in Europe and the fourth-most populous country in the European Union, with a population of about 47.4 million people. Madrid is the country's capital and biggest city; other significant cities include Barcelona, Valencia, Seville, Zaragoza, Málaga, Murcia, Palma de Mallorca, Las Palmas de Gran Canaria, and Bilbao.
Around 42,000 years ago, anatomically modern humans first arrived in the Iberian Peninsula. Pre-Roman peoples such as the ancient Iberians, Celts, Celtiberians, Vascones, and Turdetani formed the earliest civilizations and peoples in modern Spanish area. Later, foreign Mediterranean peoples like the Phoenicians and ancient Greeks established coastal trade colonies, and the Carthaginians temporarily dominated a portion of the Spanish Mediterranean coast. The Roman colonization of Hispania started in 218 BCE, and with the exception of the Atlantic coast, they swiftly dominated the region of modern-day Spain. By 206 BCE, the Romans had ousted the Carthaginians from the Iberian peninsula, dividing it into two administrative provinces, Hispania Ulterior and Hispania Citerior. The Romans left an enduring legacy of language, religion, laws, and political and social structures. Hispania also gave birth to Roman rulers such as Trajan and Hadrian.
Hispania remained under Roman control until the Western Roman Empire fell apart in the fifth century, ushering in Germanic tribal confederations from Northern and Central Europe. During this time, the peninsula was governed by the Suevi, Alans, Vandals, and Visigoths, while the Byzantine Empire controlled a portion of the Mediterranean coast. By the fifth century, the Visigothic Kingdom had established itself as the dominating force on the peninsula.
The Umayyad Caliphate attacked the Visigothic Kingdom in the early eighth century, ushering in nearly 700 years of Muslim domination in Southern Iberia. During this time, Al-Andalus became a significant economic and intellectual center, with Córdoba being one of Europe's biggest and wealthiest cities. Several Christian kingdoms arose in Northern Iberia, the most notable of which were León, Castile, Aragón, Portugal, and Navarre. Over the following seven decades, these kingdoms' sporadic southerly expansion—metahistorically characterized as a reconquest, or Reconquista—culminated in 1492 with the Christian seizing of the peninsula's last Muslim republic, the Nasrid Kingdom of Granada. That same year, Christopher Columbus set sail for the New World on behalf of the Catholic Monarchs, whose dynastic union of the Crowns of Castile and Aragon is often seen as the emergence of Spain as a single nation. Jews and Muslims were compelled to convert to Catholicism or face expulsion from Castile and Aragon. The Inquisition was entrusted with ensuring religious orthodoxy among converts. Following the Spanish colonization of the Americas, the Crown amassed a vast foreign empire, which fueled the formation of a worldwide commerce system fueled mostly by silver produced in the New World.
Spain is a developed nation with a secular parliamentary democracy and a constitutional monarchy led by King Felipe VI. It has a high-income and advanced economy, with the world's fourteenth-largest nominal GDP and sixteenth-largest PPP. Spain has one of the world's highest life expectancies, with 83.5 years in 2019. It ranks especially high in healthcare quality, with its healthcare system regarded as one of the most efficient in the world. It is a global leader in organ transplantation and donation. Spain is a member of the United Nations (UN), the European Union (EU), the Eurozone, the Council of Europe (CoE), the Organization of Ibero-American States (OEI), the Union for the Mediterranean, NATO, the Organization for Economic Co-operation and Development (OECD), the Organization for Security and Cooperation in Europe (OSCE), the World Trade Organization (WTO), and numerous other international organizations.
Spanish art, music, literature, and food have had a global impact, especially in Western Europe and the Americas. Spain boasts the world's fourth-most World Heritage Sites (49) and is the world's second-most visited nation, reflecting its vast cultural riches. With about 570 million Hispanophones, Spanish is the world's second-most spoken native language.