Siege of Algeciras (1278–1279)

The siege of Algeciras was the first of many sieges of the city by Christian forces in the lengthy period of the Spanish Reconquista. The siege, ordered by King Alfonso X of Castile also known as "el Sabio", was a fruitless military campaign initiated by the Kingdom of Castile with the objective of removing the Benimerins from Algeciras. The siege on Algeciras, then known to the Muslims as Al-Jazira Al-Khadra, was strategically important because Algeciras had been at the time the main fortress and landing place for African reinforcement troops in the Iberian Peninsula. Castile, which had a powerful armada of ships anchored in the Bay of Gibraltar to blockade such reinforcement, had a few days previously to the siege, seen that fleet obliterated by the Muslim admiral, Abu Yusuf Yaqub at the Naval Battle of Algeciras.

Context
Since the middle of the 13th century, the Marinid Dynasty was emerging as a new power in Morocco, ruled by Abu Yusuf Yaqub ibn Abd Al-Haqq. The Marinids had established contact with the Muslims of Al-Andalus and offered soldiers to the King Muhammed II in his bitter struggle against the Reconquista of the Christian kingdoms to the north. On 12 April 1275, a massive Moroccan army disembarked in Algeciras and commenced marching towards the cities of Sevilla, Jaén and Córdoba. From Castile, Ferdinand de la Cerda, who circumstantially governed the kingdom in the absence of his father, Alfonso X, found himself being interviewed by the pope in Beaucaire, could do no more than contain the invasions.

Nuño González de Lara, who controlled the frontier of Córdoba, left from the city and gave battle against the Moroccans, dying in the action, but also forced the Muslims to withdraw from their advance. Due to the constantly threatened nature of the Castilian borderlands, the infante Fernando left Burgos in August to gather an army but became deathly ill and died a little while later at Ciudad Real. His brother, the infante Sancho, who would later become Sancho IV eventually marched to Córdoba to finally counter the Marinid threat. After strengthening their positions in the area, Sancho marched to Sevilla from where he planned to command future operations and troop movements in the campaign. The son of King James I of Aragon, also named Sancho, the Archbishop of Toledo, went to join the fight in Jaén, but not wanting to wait for Lope Díaz de Haro, Lord of Biscay, died in combat shortly thereafter. His body was beheaded and his right hand cut off. The next day, the Lord of Biscay, together with a young Alonso Pérez de Guzmán, defeated a coalition of African-Andalusian forces and obliged them to withdraw.

Under these circumstances, the Muslim forces were not able to advance further into Castilian territory. In 1276, they signed a two-year truce with the Kingdom of Castile. Nevertheless, the Marinids under Yusuf did not return to Africa and maintained control in force of Algeciras and Tarifa, having a large troop presence in both cities. In the meantime, the Castilians busied themselves with issues of succession to the crown. Alfonso X decided to pass the privilege on to his son Sancho, even though he was under considerable pressure from the nobility and from his wife, Violante, that he pass the crown on to the children of the dead heir, Fernando.

The siege
It was under this set of compromising circumstances that Alfonso X decided to lay siege to the city of Algeciras, understanding that while the city remained under Moroccan control, it continually posed the threat of a new invasion of the Kingdom of Castile. Al-Jazira Al-Khadra, the name the Muslims had given to Algeciras, had been the first city founded by the Muslim conquerors when they first landed on the Iberian Peninsula in the year 711. The contemporary city stretched to the north of the Río de la Miel and possessed a complex defensive system of walls and entrances, probably being designed by the Almohads who had improved upon the original fortifications in the 8th Century. The Castilian king sent another one of his sons in March 1278, infante Pedro de Castilla y Aragón to rally his troops in Sevilla along with Sancho. As soon as the armies were joined, they marched for Algeciras. The vanguard of the column was commanded by Alfonso Fernández de Castilla, illegitimate son of Alfonso X. On 5 August 1278, the Castilian troops arrived at the outskirts of Algeciras. The army that besieged the city consisted of about 30,000 men as indicated by the chronicles of the time. A fleet of 24 ships and 80 galleys was also in place in Bay of Gibraltar in order to prevent the supply of the city from the nearby Gibraltar. That same fleet was completely annihilated in the Naval Battle of Algeciras. The fleet was commanded by Pedro Martínez de Fe and was accompanied by other important figures of the king's court, including Gonzalo Marante y Guillén de Sasanaque. The flotilla was also made up of a majority of the members of the Order of Santa María de España, a military-religious order which concentrated in naval warfare and which was later integrated into the Order of Santiago. The ground forces meanwhile completely surrounded the city, digging trenches and using various types of contemporary siege weapons on the battlements and gates of the city, concentrating on perceived weak points. The fleet established its base on Isla Verde. The first months of the siege were relatively constant. Raiding parties would leave the city to attack the Christian soldiers whilst ballistas would fire at the besiegers from inside the city. In February 1279, Alfonso X arrived to the siege and took charge of the operations. After many months, the siege remained stagnant. The casualties inflicted from the skirmishes continued to cause heavy losses, mainly in the Castilian camp. At the same time, the Muslim forces were equally unable to dislodge the siege.

Throughout April 1279, after the king returned to Castile, the Christian camp began to feel the effects of a lack of food and supplies. This was in part due to the loss of their fleet at the naval battle. The problem was exacerbated due to the large number of besieging troops and the fact that enough supplies were not being sent from Sevilla. It would not be found out for many months that much of the tax money collected in Castile with the objective of financing the siege was being diverted by the infante Pedro to entice his mother Violante to return to Castile. That autumn was especially hot and before long, the water sources that sustained the troops began to deteriorate, causing an outbreak of plague in the Christian camp. Amongst the sick soldiers, the worst off were often members of the fleet who were forced to remain for weeks on their ships without proper food or supplies. By July 1279, many of the troops from the ships abandoned the fleet and joined their counterparts on the ground in the hopes of better care. Many of the boats remained anchored off Isla Verde for this reason and by the time of the battle later that month, the fleet was easily destroyed by the Muslim galleys.

Arrival of the Muslim fleet
Throughout the blockade, Algeciras was able to maintain communication with Gibraltar by means of messenger pigeon, informing them of the awful conditions endured by the besiegers. After hearing news of this, the Moroccan king gathered 14 galleys in Tangier to send them to Algeciras. In June, Abu Yusuf Yaqub had intended to cross with his fleet onto the Iberian Peninsula, but insurrections in Nefís forced him to change his plans. On 19 July, the Muslim galleys were prepared and launched under the command of the King's son, Abu Yaqub Yusuf an-Nasr. By nightfall they had reached the outskirts of the Bay of Gibraltar and on 20 July the Muslim fleet attacked the now almost empty Castilian ships anchored at Isla Verde. The Castilian fleet was quickly defeated and their boats captured. All prisoners were decapitated except the officers who were taken hostage. For the second time in as many years, the entire Castilian fleet was lost.

The Castilian ground army, surprised by the rapid destruction of their navy, were helpless to stop the Muslims as their ships sailed into the city and their soldiers disembarked at the shipyard. The Muslim army then hastily exited the city gates and gave battle to the Christian besiegers. The infante Pedro, who was at the time in charge of the siege, fled the battle, leaving his captains to become captured and losing all siege weapons to the enemy.

Aftermath
Alfonso X was forced to sign a new truce with the Marinids later in 1279. After the battle, the King of Morocco built the Villa Nueva de Algeciras in the places where the siege works once stood so that future besiegers would not be able to use the same advantageous positions again.