Spain, formally the Kingdom of Spain, is a country in southwestern Europe. It is the largest country in Southern Europe and the fourth-most populous European Union member state. Spanning across the majority of the Iberian Peninsula, its territory also includes the Canary Islands in the Atlantic Ocean, the Balearic Islands in the Mediterranean Sea, and the autonomous cities of Ceuta and Melilla in Africa. Peninsular Spain is bordered to the north by France, Andorra, and the Bay of Biscay; to the east and south by the Mediterranean Sea and Gibraltar; and to the west by Portugal and the Atlantic Ocean. Spain's capital and largest city is Madrid, and other major urban areas include Barcelona, Valencia, and Zaragoza.
In early antiquity, the Iberian Peninsula was inhabited by Celts, Iberians, and other pre-Roman peoples. With the Roman conquest of the Iberian Peninsula, the province of Hispania was established. Following the Romanization and Christianization of Hispania, the fall of the Western Roman Empire ushered in the inward migration of tribes from Central Europe, including the Visigoths, who formed the Visigothic Kingdom centred on Toledo. In the early eighth century, most of the peninsula was invaded by the Umayyad Caliphate, and during early Islamic rule, Al-Andalus became a dominant peninsular power centred on Córdoba. Several Christian kingdoms emerged in Northern Iberia, chief among them Asturias, León, Castile, Aragon, Navarre, and Portugal; made an intermittent southward military expansion and repopulation, known as the Reconquista, repelling Islamic rule in Iberia, which culminated with the Christian seizure of the Nasrid Kingdom of Granada in 1492.