The alliance between the Nasrids of Granada and the Marinids of Morocco had fallen into abeyance following the loss of Gibraltar, but the accession of the Marinid sultan Abu al-Hasan Ali ibn Othman led to a renewal of the pact between the two Muslim states. A force of 7,000 men under the command of Abu al-Hasan's son, Abd al-Malik, was secretly transported across the Strait of Gibraltar to rendezvous with the forces of Muhammad IV of Granada at Algeciras in February 1333. The Castillians were distracted by the coronation of King Alfonso XI and were slow to respond to the invasion force, which was able to lay siege to Gibraltar before much of a response could be organised.[4]