Afonso I of Portugal, more commonly known as Afonso Henriques - Alfonso, Alphonso - (Guimaräaes, 1109, traditionally July 25, – Coimbra, 1185 December 6), also known as the Conqueror (Port. o Conquistador), was the first king of Portugal, declaring his independence from Leon-Castile, a deed often identifying the Condado Portucalense as the first nation-based state of Europe. Alfonso was the son of Henry, Count of Portugal and Teresa of Leon, the illegitimate daughter of Alfonso VI of Castile. He was proclaimed king in July 26, 1139 and died on December 6, 1185 in Coimbra.

t the end of the 11th century, the Iberian Peninsula political agenda was mostly concerned with the Reconquista, the driving out of the Muslim successor-states to the Caliphate of Câordoba after its collapse. With European military aristocracies focussed on the Crusades, Alfonso VI of Castile called for the help of the French nobility to deal with the Moors. In exchange, he was to give the hands of his daughters in wedlock to the leaders of the expedition and bestow royal privileges to the others. Thus, the heiress Urraca of Castile wedded Raimond, second son of the Duke of Burgundy, and her half-sister, princess Teresa of Leon, wedded his uncle, Henry of Burgundy. Henry was made Count of Portugal, a burdensome earldom in the south of Castile, where Moorish incursions and attacks were to be expected. With his wife Teresa as co-ruler of Portugal, Henry stood the ordeal and held the lands for his father-in-law.

From this wedlock several sons were born, but only one, Afonso Henriques (meaning "Afonso son of Henry") thrived. The boy followed his father as Count of Portugal in 1112, under the tutelage of his mother. The relations between Teresa and her son Afonso proved difficult. Only eleven years old, Afonso had already his own political ideas, greatly different from his mother's. In 1120, the young prince took the side of the bishop of Braga, a political foe of Teresa, and both were exiled by her orders. Afonso spent the next years away from his own county, under the watch of the bishop. In 1123 Afonso became fourteen, the adult age in the 12th century. He made himself a knight on his own account in the cathedral of Zamora, raised an army, and proceeded to take control of his lands. Near Guimaräaes he overcame the troops under his mother's ally Count Fernäao Peres de Trava of Galicia, making her his prisoner and exiling her forever to a monastery in Leâon. Thus the possibility of incorporating Portugal into a kingdom of Galicia was eliminated. He also vanquished Alfonso VII of Castile, another of his mother's allies, and thus freed the earldom from political dependence on the crown of Leâon and Castile. He had already a dangerously independent mind. On April 6, 1129, Afonso Henriques dictated the writ in which he proclaims himself King of Portugal.

Afonso then turned his arms against the everlasting problem of the Moors in the south. His campaigns were successful and, on July 26, 1139, he obtained an overwhelming victory in the Battle of Ourique, and straight after was unanimously proclaimed king by his soldiers. This meant that Portugal was no longer a earldom of Castile, but an independent kingdom in its own right. Next, he assembled the first assembly of the states-general at Lamego, where he was given the crown from the bishop of Braganðca, to confirm the independence.

Independence, however, was not a thing a land could choose on its own. Portugal had still to be acknowledged by the neighbouring lands and, most important, by the Catholic church and the pope. Afonso wedded Mafalda, daughter of Count Amadeo III of Savoy, and sent ambassadors to Rome to negotiate with the pope. In Portugal, he built several monasteries and convents and bestowed important privileges to religious orders. In 1143, he wrote to Pope Innocent II to declare himself and the kingdom servants of the Church, swearing to pursue driving the Moors out of the Iberian peninsula. Bypassing any king of Castile, Afonso declared himself the direct liegeman of the Papacy. Thus, Afonso continued to distinguish himself by his exploits against the Moors, from whom he wrested Santarâem in 1146 and Lisbon in 1147. He also conquered an important part of the land south of the Tagus River, although this was lost again to the Moors in the following years.

Meanwhile, King Alfonso VII of Castile (Afonso's cousin) thought of an independent Count of Portugal as nothing but a rebel. Conflict between the two lands was constant and bitter in the following years. Afonso became involved in a war, taking the sides of the Aragonese king, an enemy of Castile. To insure the alliance, his son Sancho was sworn to Dulce Berenguer, daughter of the Count of Barcelona, and princess of Aragon. Finally (probably in 1143) the Treaty of Zamora established peace between the cousins and the recognition by the Kingdom of Castile and Leon that Portugal was an independent Kingdom.

In 1167, Afonso was disabled in an engagement near Badajoz by a fall from his horse, and made prisoner by the soldiers of the king of Leon. Portugal was obliged to surrender as his ransom almost all the conquests Afonso had made in Galicia in the previous years.

In 1179 the privileges and favours given to the Catholic Church were compensated. In a papal bull, Pope Alexander III acknowledged Afonso as king and Portugal as an independent land with the right to conquer lands from the Moors. With this papal blessing, Portugal was at last secured as a country and safe from any Castilian attempts of annexation.

In 1184, in spite of his great age, he had still sufficient energy to relieve his son Sancho, who was besieged in Santarâem by the Moors. He died shortly after, in 1185.

The Portuguese reveres him as a hero, both on account of his personal character and as the founder of their kingdom.