then it is to be enjoined as Allah and His Messenger have commanded. If it is something that Allah and His Messenger have forbidden, it is to be prohibited as Allah and His Messenger have forbidden it. People may not enter into covenants, contracts, alliances or stipulations that contravene what Allah and His Messenger have commanded. Rather, each of them must fulfil the contracts and covenants that Allah has enjoined upon mankind, as Allah Most High says:
“Fulfil My covenant, and I will fulfil your covenant.”
The same applies to commitments a person undertakes alone, such as a vow; contracts concluded by two parties, such as sales, leases, gifts and the like; and arrangements that may involve either one party or two, such as endowments and bequests. In all these arrangements, whenever a person stipulates something that Allah and His Messenger have forbidden, that stipulation is invalid.
In the Sahīh, it is reported from ʿĀʾisha, may Allah be pleased with her, that the Prophet, may Allah Most High bless him and grant him peace, said:
“Whoever vows to obey Allah, let him obey Him; and whoever vows to disobey Allah, let him not disobey Him.”
Contracts that contravene what Allah and His Messenger have commanded belong to the religion of the pre-Islamic age of ignorance. They are a branch of the religion of the polytheists and those among the People of the Book who concluded agreements requiring what Allah and His Messenger had forbidden and forbidding what Allah and His Messenger had commanded. This is a grave matter that every Muslim must avoid.