Portugal, officially the Portuguese Republic, is a country on the Iberian Peninsula in Southwestern Europe. It is a unitary republic made up by mainland Portugal and two autonomous regions, with Lisbon as both its capital and largest city. The mainland is bordered by Spain to the north and east, with Madeira and the Azores in the Atlantic Ocean. It features the westernmost point in continental Europe.
The western Iberian Peninsula has been inhabited since prehistory, with the earliest signs of settlement dating to 5500 BC. Muslims invaded the Iberian Peninsula in the 8th century, but were gradually expelled during the Reconquista. Portugal was established during this period, initially as a county of the Kingdom of León in 868, and formally as a kingdom in 1179.