Portugal (Portuguese pronunciation: [puɾtuˈɣaɫ]), officially the Portuguese Republic (Portuguese: República Portuguesa [ʁɛˈpuβlikɐ puɾtuˈɣezɐ]),[note 1] is a sovereign state located mostly on the Iberian Peninsula in southwestern Europe. It is the westernmost country of mainland Europe, bordered to the west and south by the Atlantic Ocean and to the north and east by Spain. Its territory also includes the Atlantic archipelagos of the Azores and Madeira, both autonomous regions with their own regional governments.
Portugal is the oldest state in the Iberian Peninsula and one of the oldest in Europe, its territory having been continuously settled, invaded and fought over since prehistoric times. The Pre-Celts, Celts, Carthaginians and Romans were followed by the invasions of the Visigoths and Suebi Germanic peoples. Portugal as a country was established during the Christian Reconquista against the Moors who had invaded the Iberian Peninsula in 711 AD. Despite attempts at independence since its foundation as a county in 868, only after the Battle of São Mamede in 1128, where Portuguese forces led by Afonso Henriques defeated forces led by his mother, Theresa of Portugal, the County of Portugal affirmed its sovereignty and Afonso Henriques styled himself Prince of Portugal. He would later be proclaimed King of Portugal at the Battle of Ourique in 1139 and was recognised as such by neighbouring kingdoms in 1143.