After the death of Alfonso XI at the fifth siege, Castilian ambitions of reconquering Gibraltar gave way to civil war, allowing tensions between Granada and Fez to surface. In 1374, the Moors of Fez ceded Gibraltar to the Granadan Moors, apparently in exchange for the latter’s assistance with rebellions in Morocco. The garrison of Gibraltar revolted against Granada in 1410 and declared allegiance to Abu Said Uthman III of Fez, who also occupied much of the surrounding area.
The following year, Granada launched a counter-offensive aimed at re-conquering the territory it had lost to Fez and succeeded in pushing the Moroccan Moors back as far as Gibraltar. There, they initiated a siege—the only one of Gibraltar’s sieges to be contested between two Muslim powers. The Granadans repulsed several attempts to break out of the town before entering it and storming the Moorish Castle with clandestine help from inside.
The garrison was forced to surrender and Gibraltar reverted to Granadan rule.