The early history of Portugal is one of Celtic tribes, in 219 BC, the first Roman invasion took place and within 200 years the whole peninsula of what is now Spain and Portugal was annexed to the Roman Empire. Roman rule prevailed until the 5th century when Germanic tribes such as the Vandals and Visigoths invaded the peninsula. The Visigoths eventually conquered the whole Iberian peninsula until in 711 the Islamic Moors from North Africa invaded,destroying the Visigoth kingdom. Many of the Gothic nobles took refuge in the north before finally reconquering the region between the Minho and Douro rivers in 868. This county, called Portucale, was part of what was then the Kingdom of Leon, as enjoyed sporadic independence during weaker Leonese reigns. In 1139, Afonso Henriques declared independence for Portugal and pronounced himself the first king of Portugal. The Algarve region was finally wrestled from the Moors in 1250, and in 1255 Lisbon was pronounced as the capital city. Since the 13th Century the borders have remained almost unchanged.
The golden age in Portuguese history was during the Age of Discovery in the 15th and 16th centuries. Portugal was a major political and economic power with a vast colonial trading empire spanning four continents. With the discovery of Brazil and trade routes throughout Africa and East Asia, Portugal quickly became one the the richest nations in Europe. However, military defeat in Morocco and a Spanish invasion in 1580 meant that period of Portugal's history was over. For the next 60 years, Portugal would be under Spanish rule. Although at first enjoying autonomy and many Portuguese nobles receiving high positions in the Spanish courts, this changed when in 1640 Spain's Philip IV tried to make Portugal a Spanish province. The then Duke of Braganza, pronounced himself king John IV of Portugal and started a war of independence against Spain.
In the 17th century, many Portuguese emigrated to Brazil, until it's prohibition in 1709 by John V. The 18th Century then saw a return of Portugal' fortunes with the discovery in Brazil of gold. However, this was not to last long. In 1807 invasion of Portugal by Napoleon and the loss of Brazil in1825 left the country impoverished in divided. Power struggled persisted throughout the 1800's with the national debt worsening continually. Although in 1910, there was a republican revolution overthrowing the monarchy, the economic deterioration of Portugal continued until a military coup in 1926 and the installation of the dictator, Antonio Salazar. Salazar held power until health problems ended his reign in 1968. The right wing dictatorship continued up until 1974, and the Carnation Revolution. In 1976, democracy was restored and in 1986 the economy once was again set on the right track through the EU and an influx of grant have funds until becoming one of the founding members of the Eurozone in 1999. The great Portuguese empire was ultimately and finally finished also in 1999, when its last colony in Macau was returned to China.