Portugal occupies most of the Western seaboard of the Iberian Penninsula, and was formed as a result of The Reconquista.
In 868 Count Vimara Peres, a vassal of the King of Léon, reconquered the area of Moorish Spain between the Minho and Douro rivers. The area became a county in its own right, called Portucale, in reference to the Romanised city of Cale which was a port.
Technically the county was a dependency of Léon, but during the reigns of weak monarchs it enjoyed de facto independence. In 1065, under Garcia, one of the sons of Ferdinand I, the county broke away, during disputes between Garcia's other brothers, from Léon, to become the Kingdom of Galicia and Portugal. However, due to the rebellions of nobles, this lasted only 7 years before the country rejoined Leon and Castile (by then ruled by Garcia's brother, Alphonso VI.
In 1095 Portugal separated from Galicia, and at the end of the century Count Henry united the counties of Portucale and Coimbra and declared independence. His son, Alfonso, took up the struggle after his father's death and in 1128 declared himself Prince. In 1139 he elevated his title to that of King and in 1143 the country was recognised as independent, with Alfonso as Dux Portucalensis. Finally, in 1179 the Pope declared him King Alfonso I.
The first capital city was Guimaraes; then Coimbra, and finally, in 1255, after the Algarve had been reconquered, the capital was moved to Lisbon.
Portugal rose to prominence as a trading nation having discovered a passage to India by travelling south around Africa, and also establishing itself in the part of the New World which is now called Brazil. The man often given the credit for inspiring Portugal's successes on the sea is Henry the Navigator, a Prince whose interest in exploration inspired many expeditions. During the 16th century Portugal was one of the foremost kingdoms in Europe.