Is fighting polytheistic (mushrik) enemies obligatory when they besiege the Hajj?
Chapter on What the Muhrim Must Avoid and What is Permissible for Him
Al-Mughni
Book of Hajj
Primary text
Fighting polytheistic enemies is not obligatory. Obligation for combat arises only if they initiate the fight or if mobilization has occurred necessitating reinforcements. If the Muslims are strongly confident of victory against them, fighting is recommended due to the inherent merit of Jihad, the attainment of victory, and the completion of the rites (Hajj).
Supporting text
If the Muslims are strongly confident that the disbelievers will prevail, withdrawal is preferable to avoid endangering the Muslims.