Is employing legal devices (Hiyal) to circumvent religious prohibitions permissible?

Chapter on Riba (Usury) and Exchange (Sarf)

Al-Mughni

Book of Sales

Book 12 · Issue 1 · Bab 3

Open in Qurani

Primary text

All legal devices (Hiyal) are forbidden and not permissible in any matter of religion. This applies when one displays a permissible contract intending to commit a forbidden act through deception, seeking to perform what God has prohibited, legalize the unlawful, drop an obligation, or avoid a right. Ayyub al-Sakhtiyani stated that those who use such devices are deceiving God as if they were deceiving a child, noting that had they performed the act directly, it would have been easier. Malik held this view. The reasoning is that God Almighty punished a nation that used such devices by transforming them into apes, calling them transgressors, and making it a deterrent and a lesson for the pious. This is evidenced by the transformation of those who set nets for fish on Friday and collected them on Sunday, claiming no offense on the Sabbath.

Supporting text

Abu Hanifa and Al-Shafi'i held that such devices are permissible, provided they are not stipulated within the contract itself. Some followers of Al-Shafi'i consider it disliked (Makruh) to enter into a sale based on such intentions because anything forbidden as a condition in the contract is disliked to be the basis of entry into the sale.