They must, therefore, comply with the laws of their countries, albeit without disobeying the Divine imperatives. It is rare that such a conflict arises, since most of those secular laws only restrict mubâḥ (permissible) acts, which is also within the power of the authorities in Muslim countries as long as certain conditions are fulfilled. In non-Muslim countries, accepting to be a party to the social contract among the citizens of that country means giving up some of our freedoms. Also, when a true conflict arises, there is often a way out, particularly in countries that respect human freedoms and rights. For example, one may decline to partake in an unjust war on religious grounds.
Scholars have even extended some of those principles to the lands of sworn enemies when entered without covenants. Imam Muhammad ibn Ḥasan ash-Shaybâni said in as-Siyar (2/6):
If it happens that a company of Muslims pass through the enemy’s front lines by pretending to be messengers carrying official documents from the Muslim Caliph – or if they are just allowed to pass through the enemy lines – they are not allowed to engage in any hostilities with the enemy troops. Nor are they entitled to seize any of their money or properties as long as they are in the enemy’s area
of authority. This also applies if the Muslims are truly trusted by the other party.