quickly regrouped, however, and closed on Alexandria. Not willing to be trapped with his main army in Alexandria, Shirkuh left the city, leaving Saladin and a small force to defend it. The allies quickly subjected the city to a vicious siege. In his first major military position, Saladin managed to organize a continued defense of the city and maintain the support of the population, despite great suffering brought on by the long siege. Shirkuh remained largely inactive in the countryside, failing to attack either the besieging army or the garrisoned city of Cairo, which held the Fatimid Caliph. Ultimately a peace treaty was negotiated between Shirkuh and the allies with the agreement that Amalric and Shirkuh would withdraw their forces in exchange for payments and amnesty would be granted to the people of Alexandria (Shawar was only held from retribution on the city after it was made part of the peace agreement and Amalric promised protection to the city). Saladin stayed in the Crusader camp during these negotiations in which he sought to assure the terms protecting Alexandria. Campaign of 1168 Facing internal pressures stemming from his unpopular alliance with Amalric, Shawar tried to negotiate with Nur al-Din to keep Shirkuh from attacking Egypt for a third time. It was Shawar who found himself betrayed, however, when Amalric attacked Egypt in 1168. Amalric quickly captured the city of Bilbays in early November and massacred the population that had frustrated him twice in 1163. He then quickly marched on Fustat, the official capital of Egypt, before Shawar could gather his forces. Shawar responded by burning the city before Amalric could take it and use it as a base against Cairo (the Caliph's city and de facto capital of Egypt). Unimpressed by Shawar's actions, Amalric besieged Cairo and attempted to storm the city. With the enemy at the gates of his city, the Fatimid Caliph, al-Adid, requested aid from Nur al-Din. Nur al-Din quickly ordered Shirkuh to return to Egypt. Shirkuh again recruited Saladin who apparently took convincing following the hard times he had endured at Alexandria. Shirkuh left for Egypt in December 1168. Hearing of Shirkuh's arrival in Egypt in January 1169, Amalric quickly negotiated a truce with Shawar (including the usual payments by the Egyptians in exchange for withdrawal) and returned to Jerusalem. With the support of al-Adid, Shirkuh entered Cairo unopposed. Saladin then personally arrested Shawar and brought him