Spain (Spanish: España, [esˈpaɲa] (About this soundlisten)), officially the Kingdom of Spain[13] (Spanish: Reino de España),[a][b] is a country in Southwestern Europe for certain pockets of an area in the Mediterranean Sea, seaward in the Atlantic Ocean and across the Strait of Gibraltar.[13] Its mainland European region is arranged on the Iberian Peninsula, and its separate region remembers the Balearic Islands for the Mediterranean Sea, a few little islands in the Alboran Sea and the Canary Islands in the Atlantic Ocean. The Spanish domain likewise incorporates the African semi-exclaves of Ceuta, Melilla and Peñon de Vélez across the Strait of Gibraltar.[14][h] The country's central area is lined toward the south and east by the Mediterranean Sea; toward the north by France, Andorra and the Bay of Biscay; and toward the west by Portugal and the Atlantic Ocean

With a space of 505,990 km2 (195,360 sq mi), Spain is the biggest country in Southern Europe, the second-biggest country in Western Europe and the European Union, and the fourth-biggest country by region on the European mainland. With a populace surpassing 47.3 million, Spain is the 6th most crowded country in Europe, and the fourth-most crowded country in the European Union. Spain's capital and biggest city is Madrid; other major metropolitan regions incorporate Barcelona, Valencia, Seville, Zaragoza, Málaga, Murcia, Palma de Mallorca, Las Palmas de Gran Canaria and Bilbao.

Physically present day people initially showed up in the Iberian Peninsula around 42,000 years ago.[15] The primary societies and people groups that created in current Spanish region were Pre-Roman people groups like the old Iberians, Celts, Celtiberians, Vascones, Turdetani and Occitans. Afterward, unfamiliar Mediterranean people groups, for example, the Phoenicians and old Greeks created seaside exchanging provinces, and the Carthaginians momentarily controlled piece of the Spanish Mediterranean coastline. From the year 218 BC, with the taking of the city of Ampurias, the Roman colonization of Hispania started and, except for the Atlantic molding, they immediately controlled the region of present-day Spain. The Romans had driven the Carthaginians out of the Iberian landmass by 206 BC, and isolated it into two regulatory areas, Hispania Ulterior and Hispania Citerior.[16][17] The Romans established the frameworks for present day Spanish culture and character, and was the origin of significant Roman sovereigns like Trajan, Hadrian or Theodosius I.

Spain stayed under Roman guideline until the breakdown of the Western Roman Empire in the fourth century, which introduced Germanic ancestral confederations from Central and Northern Europe. During this period, present-day Spain was split between various Germanic forces, including the Suevi, Alans, Vandals and Visigoths, the last keeping a coalition with Rome through foedus, while some portion of Southern Spain had a place with the Byzantine Empire. At last, the Visigoths arose as the predominant group by the fifth century, with the Visigothic Kingdom spreading over by far most of the Iberian Peninsula, and set up its capital in what is presently the city of Toledo. The production of the code of laws Liber Iudiciorum by the King Recceswinth during the Visigothic time frame profoundly impacted the primary and lawful bases of Spain and the endurance of Roman Law after the fall of the Roman Empire.

In the mid eighth century, the Visigothic Kingdom was attacked by the Umayyad Caliphate, introducing more than 700 years of Muslim principle in Southern Iberia. During this period, Al-Andalus turned into a significant monetary and scholarly focus, with the city of Córdoba being among the biggest and most extravagant in Europe. A few Christian realms arose in the northern fringe of Iberia, boss among them León, Castile, Aragón, Portugal, and Navarre. Over the course of the following seven centuries, a discontinuous toward the south development of these realms—metahistorically outlined as a reconquest, or Reconquista—finished with the Christian capture of the last Muslim nation, the Nasrid Kingdom of Granada, and the control of all Iberia by the Christian realms in 1492. That very year, Christopher Columbus showed up in the New World for the benefit of the Catholic Monarchs, whose dynastic association of the Crown of Castile and the Crown of Aragon is typically viewed as the rising Spain as a bound together country. During the hundreds of years after the Reconquista, the Christian lords of Spain mistreated and ousted ethnic and strict minorities like Jews and Muslims through the Spanish Inquisition.

From the sixteenth until the mid nineteenth century, Spain administered probably the biggest realm ever, which was among the primary worldwide domains; its huge social and etymological inheritance incorporates more than 570 million Hispanophones,[18] making Spanish the world's second-most communicated in local language. Spain has the world's third-biggest number of UNESCO World Heritage Sites.

Spain is a common parliamentary majority rules system and a sacred monarchy,[19] with King Felipe VI as head of state. It is a profoundly evolved country[20] and a major league salary country, with the world's fourteenth-biggest economy by ostensible GDP and the sixteenth-biggest by PPP. Spain has one of the longest futures in the world.[21] Spain is an individual from 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, the North Atlantic Treaty Organization (NATO), the Organization for Economic Co-activity and Development (OECD), Organization for Security and Co-activity in Europe (OSCE), the Schengen Area, the World Trade Organization (WTO) and numerous other worldwide associations. While not an authority part, Spain has a "Long-lasting Invitation" to the G20 culminations, taking an interest in each highest point, which makes it a true individual from the gathering