
Having betrayed Ibn Hud in 1936, by helping Ferdinand III of Castile take Córdoba, in the years that followed, Muhammad I Ibn Nasr, the founder of the Nasrid Kingdom of Granada was able to gain control over the southern cities. Therefore, Gibraltar changed hands again.