Since the middle of the century. XI the Portucalense province, detached from Galicia, came to constitute a county (see oporto), limited to N. dal Minho, E. dal Duero and an ill-defined area of land, further west than the current border Portuguese. To the south, the extremity (extremadura) of the Christian territory which fluctuated according to the events of the struggle between Muslims and Leonese, approached in bulk to the Leiria-Tomar line. Towards the end of the century, Alfonso VI entrusted the government of the western lands to his two sons: Raymond of Burgundy, husband of Urraca, heir to the Leonese throne; and Enrico, also a Burgundian and cousin of Raimondo, husband of Teresa, natural daughter of the king of León. Raimondo was concerned in particular with the government of Galicia, Enrico with that of the county of Portugal, subordinate to Raimondo. It seems that from the beginning Henry showed ambitions for independence, to which motives of an ethnic and geographical nature, that is to say, proper to the country and the populations he governed, were certainly not extraneous. Meanwhile, Alfonso VI died and Urraca, former widow of Raimondo, succeeded him, and to which nobles of the kingdom imposed the marriage with Alfonso of Aragon, the civil war broke out due to the disputes between the two spouses, and the Galician nobles proclaimed the son of Urraca, Alfonso Raimundes, the future king of León and Castile, king of Galicia. Count Henry, with the support of the Portuguese nobility and clergy, took advantage of these struggles to strengthen his independence. At the same time, the metropolitan bishop of Braga was trying to escape the primatial jurisdiction of Toledo. In the last years of Henry’s rule, the Muslims recaptured Santarem and Lisbon.
According to Agooddir, opon Henry’s death (1114), his wife, who had imposed the title of “Queen Tarasia”, personally took over the government and, full of ambition and driven by the environment, openly rebelled against Leonese sovereignty. Around that time the order of the Templars was introduced in Portugal, who immediately took charge of the struggle for conquest: and Teresa greatly favored him, granting him lands and castles in the “extremadura” of the county. The struggle she sustained to expand her territory and to ensure its autonomy had various events: now Teresa allied herself with the enemies of Urraca, now she was submissive to her. In 1121, Urraca besieged his sister in the castle of Lanhoso, but the Galician revolt forced her to lift the siege. Finally there was peace, leaving Teresa to purchase some lands;
When the son of Teresa and Henry, called Alfonso Henriques, had come of age, the Portuguese “rich men”, including Egas Moniz, powerful lord of Entre Douro and Minho, who had been entrusted with the education of the child, saw in him an excellent means to ensure the independence of the Portucalense territory. In 1128, when the young Alfonso Henriques, entitled “infant”, was placed at the head of the militias, they rebelled against Teresa and, having beaten her at S. Mamede near Guimarães, they expelled her from the territory together with her lover Fernando Peres, a Galician noble. Alfonso Henriques took over the government, and immediately broke into open rebellion against his cousin Alfonso VII, who declared himself, as well as king of León and Castile, “emperor of Spain”: he invaded Galicia several times,
The Muslims had taken possession of the castle of Leiria, founded two years earlier (1135) by Alfonso Henriques himself: he retaliated in 1139 by breaking into Muslim territory and winning five Arab leaders at Ourique, on 25 July 1139. The tradition, formed since the century. XV, according to which Alfonso would have been consecrated king after this victory, has no basis, as there is documentary evidence that he used the title of “king of the Portuguese” at least since March 1139, ie about four months before the battle of Ourique. A new invasion of Galicia took place in the same year 1139: after a few years of hostility, AlfonsoVII, engaged in the fight with the Muslims, which led him victoriously to continue the march south, asked for peace, with the mediation of the archbishop of Braga, and the two adversaries, meeting in conference in Zamora, with the assistance of the papal legate Cardinal Guido di Vico, at the end of 1143, they agreed, on the basis of the recognition to Alfonso Henriques of the title of king of Portugal. He placed himself under the protection of the pope, declaring himself a vassal of the Holy See and promising the payment of the annual census of four ounces of gold; however Lucius II, accepting the homage, still used the title of “dux portucalensis” and only Alexander III, in 1179, recognized the royal title. Alfonso neglected to pay the tax; Sancho I paid the arrears, at the request of the court of Rome, but his successors disbanded from the commitment, and the payment fell into disuse.
From then on, on both sides of the unspecified Leonese-Portuguese border, the armies of the two great leaders, Alfonso VII and Alfonso Henriques, brought the Muslim wave back towards Africa: on March 15, 1147 the Portuguese king s’ took Santarem by surprise; for the conquest of Lisbon, excellently fortified, he asked for the help of a fleet of Frisian and English crusaders, which was at anchor at the mouth of the Duero, while he was besieging the city from the north. After four months of siege, on 23 October 1147, Lisbon capitulated, and shortly thereafter the castles of Cintra, in the NE, fell. of Lisbon, and of Palmela, to S. del Tago. The conquest movement continued: in 1158 Alcácer do Sal was taken (lost a few years later),
In 1169 Alfonso I attacked Badajoz, but this was rescued by Fernando II of León, son-in-law of the king of Portugal, and the latter, in retreating from the city, was taken prisoner; the son-in-law, however, not only did not take long to give him his freedom, but shortly afterwards he himself helped him in Santarem, where Alfonso was besieged by the Emir Abu Yaūqūb Yūsuf (1171).
At his death (1185), after 57 years of reign, Alfonso I left a kingdom to his son Sancho, whose independence was completely ensured and whose borders extended as far as Beja: the country had already reached more than three quarters of its territory current. The conquest continued through the four successive reigns of Sancho I (1185-1211), Alfonso II (1211-1223), Sancho II (1223-1248) and Alfonso III (1248-1279). Sancho I, still an infant, had made a victorious foray into Andalusia, taking and sacking Seville, even though he was unable to extend the Portuguese border there. Having become king, he attempted to conquer the Algarve, taking the castle of Alvor and the city of Silves (1189), the latter with the help of an army of crusaders who sailed to Palestine. But these two strongholds,
Alfonso II, himself not very warlike, sent an army to retake, with the help of a Crusader fleet, Alcácer do Sal (1217) and sent troops to help Alfonso VIII of Castile, who participated in the great victory of Las Navas de Toulouse (1212). Under Sancho II the Portuguese took from the Muslims of Alemtejo Elvas, Moura, Serpa and Mértola, the latter on the Guadiana, and descended to the ocean, taking over Tavira and Cacela on the Algarve coast. In these conquests, which took place between 1226 and 1238, the knights of S. Giacomo della Spada (or of Uclés) played an important role, of whom Paio Peres Correia was commander in Portugal. The definitive conquest of the Algarve was the work of Alfonso III, who in 1249 took Faro and reconquered Silves. However, possession of the province was claimed by the kings of Castile, who based their claims on a close agreement between Prince Alfonso of Castile and the Moor sultan of Niebla, by virtue of which the latter’s rights in the territory west of the Guadiana had to pass to the king of Castile. The dispute ended under the reign of Dionysius, son of Alfonso III, who invaded the reign of Ferdinand IV of Castile and took, on the banks of the Coa river, some lands that then remained permanently in Portugal: with the treaty of Alcanises (1297) he obtained the recognition of the possession of his father’s conquests in the Algarve. The territorial borders established in this treaty are the same as those of the current Portuguese state. The dispute ended under the reign of Dionysius, son of Alfonso III, who invaded the reign of Ferdinand IV of Castile and took, on the banks of the Coa river, some lands that then remained permanently in Portugal: with the treaty of Alcanises (1297) he obtained the recognition of the possession of his father’s conquests in the Algarve. The territorial borders established in this treaty are the same as those of the current Portuguese state.