because he has been wronged, and it does not belong to the one who leased him out, since the one who leased him out does not own him and therefore has no right to anything. But if he was unaware, he must compensate this free person according to what was stipulated in the contract, because he accepted it and regarded it as valid; therefore, he is bound by what he believed. If the judge considers it appropriate to take this excess and place it in the public treasury, there is no objection, because in reality it is wealth that does not belong exclusively to the one entitled to it. Whatever is doubtful in this respect is assigned to the public treasury. If the customary wage equals the amount stipulated in the contract, then there is no issue, since there is neither excess nor deficiency.
Another example: a person hires someone to do prohibited work, such as hiring someone to sell wine for him, carry wine for him, or the like. The lease is invalid. But regarding the worker, should we say that he is entitled to nothing because the lease is invalid and prohibited work has no value? Or should we say that the hirer must pay the wage stipulated in the contract?
The answer is that he must pay the wage stipulated in the contract. Then, if the worker knew that this was something prohibited, the money is placed in the public treasury. But if he did not know, he is given it and instructed to repent and seek forgiveness. And Allah knows best.
An example of the existence of an impediment: Zayd and Amr agree that Zayd will lease his house to Amr, and the house belongs to Zayd, but they conclude the lease contract in the mosque. A lease contract concluded in the mosque is invalid because it is prohibited. The Prophet, peace and blessings be upon him, said: “If you see someone selling or buying in the mosque, say: ‘May Allah not make your trade profitable,’ for mosques were not built for this.” (1) Thus, the lease is invalid due to the existence of an impediment. Once the term has ended, we hold him liable for the customary wage. If they contracted for twenty thousand,