The early history of Portugal, whose name derives from the Roman name Portus Cale which means the Port of the Celts, is shared with the rest of the Iberian Peninsula. The region was settled by Pre-Celts and Celts, giving origin to peoples like the Gallaeci, Lusitanians, Celtici and Cynetes, visited by Phoenicians and Carthaginians, incorporated in the Roman Republic dominions (as Lusitania after 45 BC), settled again by Suevi, Buri, and Visigoths, and conquered by Moors. Other minor influences include some 5th century vestiges of Alan settlement, which were found in Alenquer, Coimbra and even Lisbon. In 868, during the Reconquista (by which Christians reconquered the Iberian peninsula from the Muslim and Moorish domination), the First County of Portugal was formed. A victory over the Muslims at Ourique in 1139 is traditionally taken as the occasion when Portugal was transformed from a county (County of Portugal as a fief of the Kingdom of León) into an independent kingdom: the Kingdom of Portugal.
On 24 June 1128, the Battle of São Mamede occurred near Guimarães. At the Battle of São Mamede, Afonso Henriques, Count of Portugal, defeated his mother, Countess Teresa, and her lover, Fernão Peres de Trava, in battle — thereby establishing himself as sole leader. Afonso Henriques officially declared Portugal's independence when he proclaimed himself king of Portugal on 25 July 1139, after the Battle of Ourique, he was recognized as such in 1143 by Alfonso VII, king of León and Castile, and in 1179 by Pope Alexander III. Afonso Henriques and his successors, aided by military monastic orders, pushed southward to drive out the Moors, as the size of Portugal covered about half of its present area. In 1249, this Reconquista ended with the capture of the Algarve on the southern coast, giving Portugal its present day borders, with minor exceptions. In 1348 and 1349, like the rest of Europe, Portugal was devastated by the Black Death.
In 1373, Portugal made an alliance with England, which is the longest-standing alliance in the world.
In 1383, the king of Castile, husband of the daughter of the Portuguese king who had died without a male heir, claimed his throne. An ensuing popular revolt led to the 1383-1385 Crisis. A faction of petty noblemen and commoners, led by John of Aviz (later John I), seconded by General Nuno Álvares Pereira defeated the Castilians in the Battle of Aljubarrota. This celebrated battle is still a symbol of glory and the struggle for independence from neighboring Spain.
In the following decades, Portugal spearheaded the exploration of the world and undertook the Age of Discovery. Prince Henry the Navigator, son of King João I, became the main sponsor and patron of this endeavor.
In 1415, Portugal gained the first of its overseas colonies when a fleet conquered Ceuta, a prosperous Islamic trade center in North Africa. There followed the first discoveries in the Atlantic: Madeira and the Azores, which led to the first colonization movements.
Throughout the 15th century, Portuguese explorers sailed the coast of Africa, establishing trading posts for several common types of tradable commodities at the time, ranging from gold to slaves, as they looked for a route to India and its spices, which were coveted in Europe. In 1498, Vasco da Gama finally reached India and brought economic prosperity to Portugal and its then population of one million residents.
In 1500, Pedro Álvares Cabral, en route to India, discovered Brazil and claimed it for Portugal. Ten years later, Afonso de Albuquerque conquered Goa, in India, Ormuz in the Persian Strait, and Malacca, now a state in Malaysia. Thus, the Portuguese empire held dominion over commerce in the Indian Ocean and South Atlantic. The Portuguese sailors set out to reach Eastern Asia by sailing eastward from Europe landing in such places like Taiwan, Japan, the island of Timor, and it may also have been Portuguese sailors that were the first Europeans to discover Australia and even New Zealand.
Portugal's independence was interrupted between 1580 and 1640. Because the heirless King Sebastian died in the battle of Alcácer Quibir in Morocco, Philip II of Spain claimed his throne and so became Philip I of Portugal. Although Portugal did not lose its formal independence, it was governed by the same monarch who governed Spain, briefly forming a union of kingdoms, as a personal union;
The joining of the two crowns deprived Portugal of a separate foreign policy, and led to the involvement in the Eighty Years War being fought in Europe at the time between Spain and The Netherlands. War led to a deterioration of the relations with Portugal's oldest ally, and the loss of Hormuz. 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 spearheaded an uprising backed by disgruntled nobles and was proclaimed king. The Portuguese Restoration War between Portugal and Spain on the aftermath of the 1640 revolt, ended the sixty-year period of the Iberian Union under the House of Habsburg. This was the beginning of the House of Braganza, which was to reign in Portugal until 1910. On 1 November 1755, Lisbon, the largest city and capital of the Portuguese Empire, was strongly shaken by an earthquake which killed thousands and destroyed a large portion of the city.
An anachronistic map of the Portuguese Empire (1415–1999). Red - actual possessions; Olive - explorations; Orange - areas of influence and trade; Pink - claims of sovereignty; Green - trading posts; Blue - main sea explorations, routes and areas of influence.
In the autumn of 1807 Napoleon moved French troops through its allied Spain to invade Portugal. From 1807 to 1811, British-Portuguese forces would successfully fight against the French invasion of Portugal.
Portugal began a slow but inexorable decline until the 20th century. This decline was hastened by the independence in 1822 of the country's largest colonial possession, Brazil. At the height of European colonialism in the 19th century, Portugal had already lost its territory in South America and all but a few bases in Asia. During this phase, Portuguese colonialism focused on expanding its outposts in Africa into nation-sized territories to compete with other European powers there. Portuguese territories eventually included the modern nations of Cape Verde, São Tomé and Príncipe, Guinea-Bissau, Angola, and Mozambique.
In 1910, a revolution deposed the Portuguese monarchy and its last King, Manuel II, but chaos continued and considerable economic problems were aggravated by the military intervention in World War I, which led to a military coup d'état in 1926. This in turn led to the establishment of the right-wing dictatorship of the Estado Novo under António de Oliveira Salazar. Portugal was one of only five European countries to remain neutral in World War II.
In December 1961, the Portuguese army and navy were involved in armed conflict in its colony of Portuguese India against an Indian invasion. The operations resulted in the defeat of the isolated and relatively small Portuguese garrison which was forced to surrender. The outcome was the loss of the Portuguese territories in the Indian subcontinent. Also in the early 1960s, independence movements in the Portuguese overseas provinces of Angola, Mozambique, and Guinea in Africa, resulted in the Portuguese Colonial War (1961–1974).
In April 1974, a bloodless left-wing military coup in Lisbon, known as the Carnation Revolution, led the way for a modern democracy as well as the independence of the last colonies in Africa shortly after. These events prompted a mass exodus of Portuguese citizens from Portugal's African territories (mostly from Portuguese Angola and Mozambique), creating over a million destitute Portuguese refugees — the retornados. Portugal's last overseas territory, Macau, was not handed over to the People's Republic of China until 1999, under the 1987 joint declaration that set the terms for Macau's handover from Portugal to the P. R. of China. In 2002, the independence of East Timor (Asia) was formally recognized by Portugal, after an incomplete decolonization process that was started in 1975 due to the Carnation Revolution.
From the 1940s to the 1960s, Portugal was a founding member of NATO, OECD and EFTA. In 1986, Portugal joined the European Union (then the European Economic Community). In 1999, Portugal was one of the founding countries of the euro and the Eurozone. It is also a co-founder of the Community of Portuguese Language Countries (CPLP), established in 1996 and headquartered in Lisbon.