What are the conditions under which the Imam must lift the siege of a fortress?
General Chapter
Al-Mughni
Book of Jihad
Primary text
The siege must be lifted if the inhabitants surrender upon the judgment of an appointed arbitrator, or if the Imam sees a public interest in withdrawing, such as avoiding harm from staying, despairing of conquering them, or seizing an opportunity that would be lost by remaining. Evidence for withdrawal based on opportunity is found in the narration where the Prophet, peace be upon him, besieged Ta'if, gained nothing, announced he would depart the next day, returned to fighting when the companions objected, and then announced departure again, which pleased them.
Supporting text
The other conditions are the fortress being conquered by force, or the inhabitants accepting Islam (as mentioned in the first point).