 In May 1182 , Saladin captured Aleppo after a brief siege ; the new governor of the city , Imad al @-@ Din Zangi II , had been unpopular with his subjects and surrendered Aleppo after Saladin agreed to restore Zangi II 's previous control over Sinjar , al @-@ Raqqah , and Nusaybin , which would thereafter serve as vassal territories of the Ayyubids . Aleppo formally entered Ayyubid hands on 12 June . The day after , Saladin marched to Harim , near the Crusader @-@ held Antioch and captured the city when its garrison forced out their leader , Surhak , who was then briefly detained and released by al @-@ Muzaffar Umar . The surrender of Aleppo and Saladin 's allegiance with Zangi II had left Izz al @-@ Din al @-@ Mas 'ud of Mosul the only major Muslim rival of the Ayyubids . Mosul had been subjected to a short siege in the autumn of 1182 , but after mediation by the Abbasid caliph an @-@ Nasir , Saladin withdrew his forces . Mas 'ud attempted to align himself with the Artuqids of Mardin , but they became allies of Saladin instead . In 1183 , Irbil too switched allegiance to the Ayyubids . Mas 'ud then sought the support of Pahlawan ibn Muhammad , the governor of Azerbaijan , and although he did not usually intervene in the region , the possibility of Pahlawan 's intervention made Saladin cautious about launching further attacks against Mosul . 
