First siege of Gibraltar

[citation needed] Ferdinand IV promised to cede one sixth of the conquered Granadan territory to the Aragonese crown and therefore chose the entirety of the Kingdom of Almeria as its limits for the agreement with the exception of the towns of Bedmar, Alcaudete, Quesada, Arenas, and Locubin which would stay as part of Castile, having all previously been part of the Kingdom of Castile and León prior to their Muslim takeovers.

Ferdinand IV further stipulated that if the lands taken from the Kingdom of Almería did not amount to one sixth of Granadan territory, that the Archbishop of Toledo would step in to resolve any differences related to the matter.

These concessions to the Crown of Aragon led a few of Ferdinand IV's vassals to protest the ratification of the treaty, amongst them were John of Castile and Juan Manuel, Prince of Villena.

They also asked for the papal blessing of a marriage between the Infanta Eleanor of Castile, the firstborn daughter of Ferdinand IV and Jaime de Aragón y Anjou, son and heir of James II of Aragon.

[citation needed] On 29 April 1309, Pope Clement V issued the papal bull Prioribus decanis which officially conceded to Ferdinand IV one 10th of all clergy taxes collected in his kingdoms for three years to aid in financing the campaign against Granada.

[10] From Toledo, Ferdinand IV and his army marched to Córdoba where the emissaries of James II announced that the Aragonese king was prepared to besiege the city of Almeria.

[citation needed] The forces from the Crown of Aragon, under the command of James II had already begun their own war against the Kingdom of Granada and were in place besieging the city of Almería by 15 August 1309.

This ended their campaign against Granada, at great cost to Castile that was only mitigated by its success at Gibraltar and the cession of the border towns of Quesada, Quadros, Belmar and a payment of 5,000 golden pistoles.

[15] The Muslim historian Ahmed Mohammed al-Maqqari writes of the Algeciras campaign in a similar form, saying: In the year 709 (beginning June, a.d. 1309), the King of Castile, Herando (Ferdinand IV.

Upon the discovery of an attempt on his life, Muhammed III travelled back to Granada where the populace was up in arms and his brother, Nasr Abul Geoix had installed himself on the throne.

One of the incentives offered for this repoblación was that all "swindlers, thieves, murderers and wives escaped from their husbands" could take refuge in the city and be free of any prosecution from the law, including the penalty of death (although this provision did not extend to traitors to the crown).

Some of the Moorish fortifications of Gibraltar, dating to this period, still stand today. The most prominent being the remains of the Moorish Castle .