The Battle of Ceuta (1309) was a military confrontation between the Crown of Aragon and the Nasrid kingdom of Granada at the city of Ceuta during the Castilian-Granadian War (1309-1319). The Marinid (Benimerin) Sultanate wished to occupy the city but lacked a navy to carry out the enterprise. The Crown of Aragon, which had gone to war against Granada, set out to conquer the city on behalf of the Marinids..
On December 19, 1308, in Alcalá de Henares, Ferdinand IV of Castile and the Aragonese ambassadors Bernat de Sarriá and Gonzalo GarcÃÂa initialled the Treaty of Alcalá de Henares Ferdinand IV, who had the support of his brother, the infante Pedro of Castile, Diego López V of Haro, the archbishop of Toledo, and the bishop of Zamora, agreed to initiate war against the kingdom of Granada on 24 June 1309 and pledged, as did the Aragonese monarch, not to sign a separate peace with the Granadan monarch. The Castilian king would contribute ten galleys to the expedition, and the Aragonese king would contribute ten galleys as well. It was approved with the agreement of both parties that the troops of the Kingdom of Castile and León would attack the strongholds of Algeciras and Gibraltar, while the Aragonese would conquer the city of AlmerÃÂa. Ferdinand IV undertook to cede one sixth of Granada to the Aragonese king and granted him the kingdom of AlmerÃÂa in its entirety as an concession in advance.
Under the Treaty of Barcelona (1309), an alliance was agreed upon between King Jaime II of Aragon and Abu'l-Rabi Sulayman ibn Yússuf, the Marinid sultan, whereby the latter engaged the services of a fleet and an army of Aragonese Christian mercenaries for the conquest of Ceuta, then held by Emir Nasr ibn Muhammad of Granada.
The ships of occupied the Strait of Gibraltar while commanded the ships of the under James II of Aragon in the conquest of Ceuta on 21 July 1309, as a preliminary operation preceding the Marinind campaign against al-Mariyya (Almeria).
Once the stronghold had been taken, it was handed over to the Marinids, who changed sides and decided to help the Grenadians. Vice-Admiral Eimeric, as captain of the squadron of the Strait of Gibraltar, had to close the strait and pevent these now-hostile forces from crossing to the Iberian Peninsula. For his bravery he was then compared to Roger de Lauria.
James II of Mallorca added a galley to the blockade of the strait to rescue some Mallorcan merchants held captive in the Nasrid kingdom of Granada.