In 1132 Ayyub was in the service of Imad ad-Din Zengi. He participated in a battle against the Seljuk Sultan near Tikrit and saved Zengi's life when he assisted his retreat across the Tigris. In 1136, Shirkuh killed a Christian with whom he was quarrelling in Tikrit, and the brothers were exiled (Ayyub's son Yusuf, later known as Saladin, was supposedly born the night they left). Zengi later appointed Ayyub governor of Baalbek, and when the town was besieged in 1146 by Mu'in ad-Din Unur, the atabeg of the Burid emir of Damascus, Ayyub surrendered Baalbek and retired to Damascus. Shirkuh, meanwhile, entered the service of Zengi's son Nur ad-Din Zengi, who had designs on Damascus; when the Second Crusade besieged the city in 1148, Nur ad-Din forced Mu'in ad-Din and the Burids into a reluctant alliance. Soon Nur ad-Din demanded the city be handed over to him, and Ayyub and Shirkuh negotiated its surrender in 1154. Ayyub remained governor of Damascus under Nur ad-Din's rule. He was held in such honour that he was the only one of Nur ad-Din's officials allowed to remain seated in his presence.