Portugal's history goes back to the Celts, who settled the Iberian Peninsula around 700 BC. The region soon attracted a succession of peoples and was colonised by the Phoenicians, Greeks, Romans and Visigoths. In the 8th century, the Moors crossed the Strait of Gibraltar and commenced a long occupation that introduced their culture, architecture and agricultural techniques to Portugal. But resistance to the Moors grew and they were finally ejected during the 13th century.
In the 15th century, Portugal entered a phase of overseas expansion due to the efforts of Prince Henry the Navigator. Mariners set off to discover new trade routes and helped create an enormous empire that, at its peak, extended to India, the Far East, Brazil and Africa. This period marked the apogee of Portuguese power and wealth, but it faded towards the end of the 16th century when Spain's Felipe II claimed the throne. Although Spanish rule lasted only a few decades, the momentum of the empire declined over the following centuries.
At the close of the 18th century Napoleon sent expeditionary forces to invade Portugal but they were forced back by the troops of the Anglo-Portuguese alliance. During the 19th century the economy faltered and republicanism took hold. National turmoil led to the abolition of the monarchy in 1910 and the founding of a democratic republic.
Portugal's democratic phase lasted until 1926, when a military coup ushered in a long period of dictatorship under António de Oliveira Salazar. His reign came to an end in 1968 when he sustained brain damage after falling off a chair. Anachronistic attempts to hold onto colonies in the face of nationalist independence movements resulted in costly wars in Africa and led to the Revolution of the Carnations, a bloodless military coup on 25 April 1974.
During the 1970s and early 1980s, Portugal underwent some painful adjustments: the political climate vacillated between right and left, and the economy suffered from wrangles between government and private ownership. The granting of independence to Portugal's African colonies in 1974-75 resulted in a flood of over 500,000 refugees into the country. Entry into the European Community (EC) in 1986 restored some measure of stability, which was buttressed by the acceptance of Portugal as a full member of the European Monetary Union in 1999. Portugal's last overseas territory, Macau, was handed over to the Chinese in 1999. The governing Socialist Party was returned to power in elections in October 1999 despite a campaign overshadowed by events in East Timor. The Socialist president is Jorge Sampaio and the next presidential elections are due in 2006. The current prime minister is Durão Barroso of the Social Democratic Party, which won the 2002 elections after six years in opposition.