Ṣalāḥ ad-Dīn Yūsuf ibn Ayyūb, better known in the Western world as Saladin, led the Muslim opposition against the European Crusaders in the Levant. Under Saladin's personal leadership, the Ayyubid army defeated the Crusaders at the decisive Battle of Hattin in 1187, leading the way to the Muslims' re-capture of Palestine from the Crusaders who had conquered it 88 years earlier. After the Battle of Hattin survivors and other refugees fled to Tyre, the only city able to hold out against Saladin. In Tyre, Balian of Ibelin, one of crusaders, had asked Saladin for safe passage to Jerusalem in order to retrieve his wife Maria Comnena, Queen consort of Jerusalem and their family. Saladin granted his request, provided that Balian not take up arms against him and not remain in Jerusalem for more than one day.
Upon arriving to Jerusalem Balian found the situation in Jerusalem dire. The city was filled with refugees fleeing Saladin's conquests, with more arriving daily. Negotiations were carried out between Saladin and Balian, through the mediation of Yusuf Batit, one of the Eastern Orthodox clergy. Saladin preferred to take the city without bloodshed and offered generous terms, but those inside refused to leave their holy city, vowing to destroy it in a fight to the death rather than see it handed over peacefully. Thus the siege began. The walls were constantly pounded by the siege engines, catapults, mangonels, petraries, Greek fire, crossbows, and arrows. A portion of the wall was mined, and it collapsed on September 29.
At the end of September, Balian rode out with an embassy to meet with the sultan, offering the surrender that he had initially refused. Saladin acquiesced, and the two agreed that the city would be handed over to Saladin peacefully, preventing the sort of massacre that had occurred when the crusaders captured the city in 1099. For the Franks of Crusader origin the sultan allowed a ransom of twenty bezants for men, ten for women, and five for children, but those who could not pay were to be sold into slavery. Native Christians and Eastern Orthodox Christians were allowed to remain in the city. After long negotiations ransoms were lowered. Finally, it was decided that Saladin would free the seven thousand for 30,000 bezants; two women or ten children would be permitted to take the place of one man for the same price. Saladin's brother then released another 1,000 people unable to pay and 2,000 more people unable to pay were then released. Saladin then freed all of the elderly unable to pay.
The ransomed inhabitants marched away in three columns; the Templars and Hospitallers led the first two, with Balian and the Patriarch leading the third. The victory was Saladin's.