The region of present-day Portugal has been inhabited by humans since circa 400.000 years ago, when Homo heidelbergensis entered the
area. Later Neanderthals roamed the northern Iberian peninsula and Homo sapiens arrived in Portugal around 35.000 years ago
and spread rapidly throughout the country.
Modern archaeology and research shows a Portuguese root to the Celts in Portugal. During that period and until the Roman invasions,
the Castro culture (a variation of the Urnfield culture) was prolific in Portugal and modern Galicia. Based on the Roman chronicles
about the Callaeci peoples, it is possible to infer that there was a matriarchal society, with a military and religious aristocracy
probably of the feudal type. The figures of maximum authority were the chieftain (chefe tribal), of military type and with authority
in his Castro or clan, and the druid, mainly referring to medical and religious functions that could be common to several castros.
There were other similar tribes, and chief among them were the Lusitanians, Celtici and Cynetes.
A few small, semi-permanent, commercial coastal settlements were also founded in the Algarve region by Phoenicians–Carthaginians.
Romanization began with the arrival of the Roman army in the Iberian Peninsula in 218 BC during the Second Punic War against Carthage.
Roman occupation suffered a severe setback in 155 BC, when a rebellion began in the north. The Lusitanians and other native tribes, under the
leadership of Viriathus, wrested control of all of western Iberia. The conquest of the Iberian Peninsula was complete two centuries after
the Roman arrival, when they defeated the remaining tribes in the Cantabrian Wars in the time of Emperor Augustus (19 BC).
In the early 5th century AD, Germanic tribes, namely the Suebi, the Vandals and Alans invaded the Iberian Peninsula where
they would form their kingdom. In 409 the Kingdom of the Suebi, with its capital in Braga, was established in the former Roman provinces
of Gallaecia-Lusitania. In 429, the Visigoths moved south to expel the Alans and Vandals and founded a kingdom with its capital in Toledo.
From 470, conflict between the Suebi and Visigoths increased. In 585, the Visigothic King Leovigild conquered Braga and annexed Gallaecia.
From that time, the Iberian Peninsula was unified under a Visigothic Kingdom.
During the caliphate of the Umayyad Caliph Al-Walid I, the Berber commander Tariq ibn-Ziyad led a small force that landed at
Gibraltar on 30 April 711, ostensibly to intervene in a Visigothic civil war. After a decisive victory over King Roderic at the
Battle of Guadalete on 19 July 711, Tariq ibn-Ziyad, joined by the Arab governor Musa ibn Nusayr of Ifriqiya, brought most of
the Visigothic kingdom under Muslim occupation in a seven-year campaign. Muslims called their conquests in Iberia 'al-Andalus'
and in what was to become Portugal, they mainly consisted of the old Roman province of Lusitania (the central and southern regions of the
country), while Gallaecia (the northern regions) remained unsubdued. Until the Berber revolt in the 730s, al-Andalus was treated as a dependency
of Umayyad North Africa, and in 756 it gained its independence under Abd-ar-Rahman I with the establishment of the
Emirate of Córdoba. After almost two centuries, the Emirate became the Caliphate of Córdoba in 929, until its dissolution a
century later in 1031 into no less than 23 small kingdoms, called Taifa kingdoms.
In 718 AD, a Visigothic noble named Pelagius was elected leader by many of the ousted Visigoth nobles. Pelagius called for the remnant
of the Christian Visigothic armies to rebel against the Moors and re-group in the unconquered northern Asturian highlands, better known today
as the Cantabrian Mountains, a mountain region in modern northwestern Spain adjacent to the Bay of Biscay. He planned to use the
Cantabrian Mountain range as a place of refuge and protection from the invaders and as a springboard to reconquer lands from the Moors.
After defeating the Moors in the Battle of Covadonga in 722 AD, Pelagius was proclaimed king to found the Christian Kingdom of
Asturias and start the war of reconquest known in Portuguese (and Spanish) as the "Reconquista".
At the end of the 9th century, the region of Portugal, between the rivers Minho and Douro, was reconquered from the Moors by the nobleman
and knight Vímara Peres on the orders of King Alfonso III of Asturias. Vímara Peres organized the region he had reconquered,
and elevated it to the status of County, naming it the County of Portugal after the region's major port city – "Portus Cale"
or modern Porto. The Kingdom of Asturias was later divided as a result of dynastic disputes; the northern region of Portugal became part of
the Kingdom of Galicia and later part of the Kingdom of León.
In 1093, Alfonso VI of León bestowed the county to Henry of Burgundy and married him to his illegitimate daughter, Teresa of
León, for his role in reconquering the land from Moors. On 24 June 1128, the Battle of São Mamede occurred where Afonso Henriques,
Count of Portugal, defeated his mother Countess Teresa, thereby establishing himself as sole leader. Afonso then turned his arms against
the Moors in the south. Afonso's campaigns were successful and, on 25 July 1139, he obtained an overwhelming victory in the Battle of
Ourique, and straight after was unanimously proclaimed King of Portugal by his soldiers.
The Algarve, the southernmost region of Portugal, was finally conquered from the Moors in 1249, and in 1255 the capital shifted to
Lisbon. Spain finally completed its Reconquista until 1492, almost 250 years later. The border with Spain has remained almost
unchanged since the 13th century. The Treaty of Windsor (1386) created an alliance between Portugal and England that remains in
effect to this day. Since early times, fishing and overseas commerce have been the main economic activities.
During the 15th and 16th centuries, Portugal became a leading European power that ranked with England, France and Spain in terms of economic,
political and cultural influence. Portugal also spearheaded European exploration of the world and the Age of Discovery. Prince
Henry the Navigator, son of King John I of Portugal, became the main sponsor and patron of this endeavour. During this period,
Portugal explored the Atlantic Ocean, discovering the Atlantic archipelagos the Azores, Madeira, and Cape Verde; explored the African coast;
colonized selected areas of Africa; discovered an eastern route to India via the Cape of Good Hope; discovered Brazil, explored the Indian
Ocean, established trading routes throughout most of southern Asia; and sent the first direct European maritime trade and diplomatic missions
to China and Japan.
Portugal voluntarily entered a dynastic union between 1580 and 1640. This occurred because the last two kings of the House of Aviz – King
Sebastian, who died in the Battle of Alcácer Quibir in Morocco, and his great-uncle and successor, King-Cardinal Henry of
Portugal – both died without heirs, resulting in the Portuguese succession crisis of 1580.
Subsequently, Philip II of Spain claimed the throne and was accepted as Philip I of Portugal. The joining of the two crowns
deprived Portugal of an independent policy and led to its involvement in the Eighty Years' War between Spain and the Netherlands.
War led to a deterioration of the relations with Portugal's oldest ally, England, and the loss of Hormuz, a strategic trading post
located between Iran and Oman.
From 1595 to 1663 the Dutch-Portuguese War primarily involved the Dutch companies invading many Portuguese colonies and commercial
interests in Brazil, Africa, India and the Far East, resulting in the loss of the Portuguese Indian sea trade monopoly.
In 1640, John IV of Portugal spearheaded an uprising backed by disgruntled nobles and was proclaimed king. The Portuguese Restoration
War ended the sixty-year period of the Iberian Union under the House of Habsburg. This was the beginning of the House of Braganza,
which reigned in Portugal until 1910.
In the autumn of 1807, Napoleon moved French troops through Spain to invade Portugal. As Napoleon's army closed in on Lisbon,
João VI of Portugal, the prince regent, transferred his court to Brazil and established Rio de Janeiro as the capital of the
Portuguese Empire. In 1815, Brazil was declared a Kingdom and the Kingdom of Portugal was united with it, forming a pluricontinental state,
the United Kingdom of Portugal, Brazil and the Algarves.
As a result of the change in its status and the arrival of the Portuguese royal family, Brazilian administrative, civic, economical, military,
educational, and scientific apparatus were expanded and highly modernized. Portuguese and their allied British troops fought against the
French Invasion of Portugal and by 1815 the situation in Europe had cooled down sufficiently that João VI would have been able to return
safely to Lisbon. However, the King of Portugal remained in Brazil until the Liberal Revolution of 1820, which started in Porto,
demanded his return to Lisbon in 1821. Thus he returned to Portugal but left his son Pedro in charge of Brazil. When the Portuguese
Government attempted the following year to return the Kingdom of Brazil to subordinate status, his son Pedro, with the overwhelming support
of the Brazilian elites, declared Brazil's independence from Portugal.
On 1 February 1908, King Dom Carlos I of Portugal and his heir apparent and his eldest son, Prince Royal Dom Luís Filipe,
Duke of Braganza, were assassinated in Lisbon in the Terreiro do Paço by two Portuguese republican activist revolutionaries. Under his
rule, Portugal had been declared bankrupt twice – first on 14 June 1892, and then again on 10 May 1902 – causing social turmoil,
economic disturbances, angry protests, revolts and criticism of the monarchy. His second and youngest son, Manuel II of
Portugal, became the new king, but was eventually overthrown by the 5 October 1910 Portuguese republican revolution, which
abolished the monarchy and installed a republican government in Portugal, causing him and his royal family to flee into exile in
London, England. Political instability and economic weaknesses were fertile ground for chaos and unrest during the First Portuguese
Republic. These conditions would lead to 28 May 1926 coup d'état, and the creation of the National Dictatorship (Ditadura
Nacional). This in turn led to the establishment of the right-wing dictatorship of the Estado Novo under António de
Oliveira Salazar in 1933.
In 1961, the Portuguese army was involved in armed action in its colony in Goa against an Indian invasion. The operations resulted
in a Portuguese defeat and the loss of the colonies in India. Independence movements also became active in Portuguese Angola, Portuguese
Mozambique and Portuguese Guinea; the Portuguese Colonial War started.
The Portuguese government and army resisted the decolonization of its overseas territories until April 1974, when a left-wing military
coup in Lisbon, known as the Carnation Revolution, led the way for the independence of the overseas territories in Africa and Asia,
as well as for the restoration of democracy after two years of a transitional period known as PREC (Processo Revolucionário Em Curso).
This period was marked by political turmoil, violence, and instability, and the nationalization of industries. Portugal was polarized between
the conservative north, with its many independent small farmers, and the radical south, where communists helped peasants seize control
of large estates. Finally, in the 1976 legislative election, the Socialist Party came in first in elections and its leader
Mário Soares formed Portugal's first democratically elected government in nearly a half century.
The Social Democratic Party and its center-right allies under Prime Minister Aníbal Cavaco Silva gained control of parliament in
1987 and 1991 while the Socialist Party and its allies succeeded in the 1991 presidential election to retain the presidency for its popular
leader Mario Soares.
In 1996, Jorge Sampaio became president. He won re-election in January 2001.