Amalric had come to power in 1164 and had made it his goal to conquer Egypt. Egypt had been invaded by King Baldwin I fifty years earlier, and the weak Fatimid Caliphate was forced to pay yearly tribute to Jerusalem. Amalric turned towards Egypt because Muslim territory to the east of Jerusalem had fallen under the control of the powerful Zengid sultan Nur ad-Din. Nur ad-Din had taken control of Damascus in 1154, six years after the disastrous siege of Damascus by the Second Crusade in 1148. Jerusalem could now expand only to the southwest, towards Egypt, and in 1153 Ascalon, the last Fatimid outpost in Palestine, fell to the crusaders. Nur ad-Din, however, also wished to acquire Egypt, and sent his army to hinder Amalric's plans. This was the situation in the east when William returned from Europe. In 1167 Amalric married Maria Comnena, grand-niece of Byzantine emperor Manuel I Comnenus, and in 1168 the king sent William to finalize a treaty for a joint Byzantine-crusader campaign against Egypt. The expedition, Amalric's fourth, was the first with support from the Byzantine navy. Amalric, however, did not wait for the fleet to arrive. He managed to capture Damietta, but within a few years he was expelled from Egypt by one of Nur ad-Din's generals, Saladin, who would later become Jerusalem's greatest threat.