Portugal, officially the Portuguese Republic (República Portuguesa ), is a country located mostly on the Iberian Peninsula in southwestern Europe. It is the westernmost sovereign state of mainland Europe. It is 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 on 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-Celtic people, 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. Founded in 868, the County of Portugal gained independence after the Battle of São Mamede in 1128. The Kingdom of Portugal was proclaimed following the Battle of Ourique in 1139 and was recognised by the neighbouring kingdoms by the Treaty of Zamora in 1143.