. The first steps south of the Tagus were taken when
Almada was captured during the siege of Lisbon, while Palmela was abandoned by its garrison when Lisbon fell into the hands of the Portuguese. The Alentejo was to be the scene of conflict between the Portuguese and Muslims for 91 years. Afonso Henriques tried to personally take
Alcácer do Sal by surprise in 1151 at the head of a party of men, like he had done at Santarém, however the Portuguese were detected and the king wounded, hence he returned to Lisbon. That same year King Afonso laid plans for another attack on Alcácer do Sal and the English Bishop of Lisbon
Gilbert of Hastings was sent to England to obtain help. After thirty years of stable leadership, León and Castile were divided between
Ferdinand II of León and
Sancho III of Castile. . News of the situation in León quickly reached Portugal. In April 1158 Alcácer do Sal was attacked for the fourth time and taken at the end of a sixty days siege, on 24 June. While the siege of Alcácer do Sal was ongoing, Ferdinand II of León and Sancho III of Castile met at the monastery of Sahagun in May 1158.
The first Almohad invasion of Portugal, 1161 The entirety of the Maghreb was fully conquered by the Almohad Caliph
Abd al-Mumin in 1160. The Almohads followed a radical version of Islam which placed great emphasis on holy war and tolerated neither Christians or Jews under their rule. They were now free to focus on the Iberian peninsula and Abd al-Mumin crossed the
Strait of Gibraltar at the head of a large army of 18,000 men at the end of that year. Informed of the progress of the Portuguese south of the Tagus, he sent a detachment commanded by Abu Mohammed Abdallah ben Hafs to the western part of the peninsula. King Afonso gathered his host and took the field but at the
Battle of Alcácer do Sal, the Portuguese were routed by the Almohads. Beja was evacuated and all the territory south of the Tagus was abandoned to the Almohads, with the exception of the port city of Alcácer do Sal, which remained as a bastion of Christian defense. Abu Hafs did not press further north after the Battle of Alcácer do Sal and was called back. After Sesimbra had fallen to the Christians, the Almohad governor of Badajoz marched to the region with an army to recapture it, but he was defeated at the
Battle of Palmela, and this town surrendered afterwards. In 1166 still the warrior monks of a recently created Catholic military Order settled at Évora, however by order of the Pope they were integrated in the
Order of Calatrava. Afonso Henriques also captured on this year
Coruche,
Arronches,
Elvas, and
Odemira, the latter via a surprise amphibious attack, quietly sailing up the
Mira River; during the attack, the Portuguese encountered little resistance. In 1167,
Monsaraz was captured by men of Geraldo the Fearless that had departed from Évora, while
Gonçalo Mendes da Maia captured
Noudar.
The siege of Badajoz, 1169 Badajoz was one of the most important Almohad fortresses in the Andaluz and its authorities paid tribute to the
Emperor of León. Due to the constant civil strife, its surrounding territory was by then depopulated. War broke out between Portugal and León in 1167 and two years later Badajoz was attacked by
Gerald the Fearless and his men, who scaled the walls and took over the city. Its garrison however withdrew to its high citadel, which the men of Geraldes proved unable to take hence they requested aid from Afonso Henriques. The host of the Portuguese king arrived at Badajoz and settled within the city, however the defenders still in the high citadel were unexpectedly relieved not by the Almohad Caliph but by the Emperor of León and his army. When Afonso attempted to sally out with his men on horseback he broke his leg against the city gates and was then captured by the Leonese in Caia.
Almohad attacks 1170–1173 The debacle of Badajoz in 1169 did not demoralize the Portuguese. Just a few months after the siege, Gerald the Fearless resumed the raids against the region of Badajoz and after luring its garrison out via a feigned attack and retreat he ambushed it and routed it completely. As king Afonso was now physically unable to ride and therefore lead his host on campaign, prince Sancho was knighted at the
Church of Santa Cruz in Coimbra on August 15, 1170. A few weeks later in September the prince led a new siege against the now severely weakened Badajoz but the city was once again relieved on time, not just by Leonese forces but by an Almohad army commanded by
Abu Hafs Umar ibn Yahya al-Hintati as well. After the great Almohad attack on Santarém, the master of the Templars in Portugal
Gualdim Pais promoted the renovation of
Almourol Castle in 1171 in order to strengthen the defenses of Portugal. Still this year, Gerald the Fearless was driven from his castle at Lobon. The Almohads are likely to have recaptured Beja in 1171. In August 1172, Gerald the Fearless launched a surprise night-time attack against the city. Its walls were poorly guarded as the Almohad governor Umar Ibn Sahnun had embezzled the pay of the sentries. The Portuguese managed to scale a tower and secure the city after a melee throughout its streets, but found they could not hold it and so they torched it, while its inhabitants scattered. Ambassadors were dispatched to Seville and a truce was then agreed-upon between Afonso Henriques and the Almohads a month later in October 1173.
Truce, 1173–1178 After this truce was signed, Geraldo the Fearless left the service of king Afonso with 350 men and sought employment under the Almohads, who stationed him in
Sous in north-Africa. After communications between Geraldes and king Afonso surfaced, he was transferred further inland to Draa and executed by the governor. A number of residents of Lisbon sailed to
Sagres and brought back the remains of the saint buried in a temple on the "
Sacred Promontory".
The great Triana Raid, 1178 Once the truce with the Muslims was over, prince
Sancho led a great raid deep into Muslim territory. Troops gathered in Coimbra in the month of May and they included both infantry and cavalry drawn from the Order of Calatrava, the urban militias of the city as well as various other towns, such as Santarém, Lisbon and Évora, and the hosts of some of the main nobles in Portugal. They camped a few kilometers west of Seville and routed an Almohad army dispatched to intercept them in a large pitched-battle outside the city. The great Triana Raid was one of the most daring military operations conducted in the history of Portugal and allowed the prince Sancho to affirm himself as a worthy commander and heir to the throne. A major landmark in Portuguese history was achieved in 1179 as by the Papal decree
Manifestis Probatum, Portugal was acknowledged as an independent kingdom by the Vatican, largely as a result of king Afonsos efforts against the Muslims. He then proceeded for
Ceuta and captured the ships on its harbour. At Évora however, the Almohads were forced to lift the siege and return to Seville. In 1182/83 a new Portuguese expedition formed by local militias from Lisbon and Santarém sacked the Ajarafe, the land of villages and olive orchards to the west of Seville. They would take numerous captives. The Almohad Caliph
Abu Yaqub Yusuf then crossed the
Strait of Gibraltar in 1184 and moving through Seville and Badajoz invaded Portugal at the head of a large army with African and Andalusian contingents, in the sixth major offensive against Portugal. He
besieged Santarém, then defended by Afonso Henriques, while Almohad detachments spread out through Estremadura and plundered the region. Prince Sancho managed to reinforce the city, and conducted a successful sally against the Almohads. Shortly after the siege of Santarém, Lisbon was attacked by an Almohad fleet, that included a large
dromon outfitted with a
siege tower. However the ship was sunk in a daring sabotage operation during the night, and after plundering the outskirts of Lisbon the following morning, the Almohads withdrew. His first four years were peaceful. Sancho was faced with the problem of large stretches of half-abandoned territory, ruined settlements and untilled fields due to war. A new castle was built on the Galician border at Contrasta, nowadays known as
Valença.
The capture of Silves, 1189 When Jerusalem was conquered by Saladin in October 1187, Pope Gregory VIII called for the
Third Crusade. Sancho realized that a new wave of crusader fleets would soon pass by the Portuguese coasts on their way to Palestine. In 1189 ships from
Denmark and
Frisia called at Lisbon, and in June they attacked the
castle of Alvor in
Algarve. They were accompanied by Portuguese galleys as far as Gibraltar. A new crusader fleet called at Lisbon in 3 or 4 July and on this occasion king Sancho obtained their support for a planned attack against the major city of
Silves, the most important one in the
Gharb al-Andalus. On July 20, 1189, the Portuguese host set up camp close to Silves just as the crusader fleet arrived by sea and sailed up the
River Arade. The city was first attacked the following day for about a month and a half it was subjected to a violent siege, in which siege engines were used. The inhabitants surrendered, together with the surrounding castles at
Lagos,
Alvor,
Portimão,
Monchique, Santo Estêvão,
Carvoeiro,
São Bartolomeu de Messines,
Paderne e
Sagres.
The great Almohad campaign of 1190 The Almohad Caliph
Abu Yusuf Yacub al-Mansur had been planning a great campaign against Portugal at least since 1188, even before the conquest of Silves. The taking of this prestigious city by the Portuguese however caused outrage in the Maghreb and the Caliph ordered holy war to be preached. In April 1190 he crossed the Strait of Gibraltar at the head of a large army and besieged Silves in June. The Caliph however left his cousin Sayyid Yahya Ibn Umar at the command of operations and then left for Cordoba, where he met with ambassadors of King
Alfonso VIII of Castile, who accepted a truce, leaving the Almohads free to focus on the planned attack against Portugal. While Silves was under siege,
Torres Novas was attacked and taken. Its defenders were granted freedom.
The Caliph then personally besieged Tomar, a powerful Templar castle defended by Gualdim Pais, master of the Templars in Portugal. The Caliphs objective however was the important city and stronghold of Santarém. The king then departed to Santarém and settled in the city with his troops. Having met stiffer resistance than anticipated, the Caliph ordered the sieges on Santarém and Tomar to be lifted, and withdrew south. A Muslim garrison was then installed in the city, which was left under the command of the Andalusi Mohammed Ibn Sidray Ibn Wazir. A new siege was set upon Silves and this time the Caliph possessed four times more siege weapons than the defenders. The walled city was breached and the defenders withdrew to the high citadel. The Portuguese surrendered on July 25, being allowed to leave with their lives only and the campaign was brought to a close. == Consolidation, 1191–1217 ==