Question: A man lent his house to another to live in. The borrower lived in it and incurred some expense on it—on paints and the like. After several months the owner reclaimed his house and took it back. Does the borrower have a right to be compensated for the expense, or not?
Answer—and Allah is the One who grants success: If the expense was on something without which residence is not realized—such as plumbing, drainage channels, repairs of exterior doors, roofs, and the like of what is essential or near-essential for the house—then the borrower has a right to be compensated for the expense. But if the expense was on embellishments that are not essential, and the owner did not authorize them, then he has no right to any compensation, for he is effectively a volunteer.
If it is said: What is the difference between the two cases?
We say: In the first case, the owner knows that proper residence cannot be realized without repairing what was mentioned, and that such repair requires expense. Thus, his permitting residence is tantamount to instructing those repairs.
In the second case, there is no need or necessity for whitening (repainting) and improving (cosmetics); there was no authorization for that. Hence, we said he is, in that case, a volunteer and not entitled to reimbursement.
Yes: the borrower may take what can be removed without causing damage—such as water pipes, electrical fixtures, doors, tiles, washbasins, and the like—and he must repair whatever damage results from removing those items.
If the loan for use (ʿāriyah) was time-limited: if (the owner) took back the house before the term ended, the owner pays the expense; but if he did not take it back until after the agreed term ended, he is not obliged to pay any of the expense.
What we have stated accords with prevailing custom among people as we know it, and we have not strayed far from what the jurists of the madhhab said. They said: in the case of one who lends an empty plot (ʿarṣah) for digging a well or for a vault, if the owner retracts before the term ends, he must pay the cost.
They said: one who retracts in an ʿāriyah—whether open-ended or time-limited—before the term ends, owes the borrower (who built or planted) two options: if he wishes, he may demand from the lender the value of the building, planting, and the like; and if he wishes, he may remove his building and planting.
They said: whoever lends land for cultivation or planting, and (the borrower) ploughs and irrigates, then the lender retracts—he (the lender) must pay the value of that (work), because it has been consumed for the borrower and cannot be detached.
They said: permission to reside on an empty plot is permission to build, not to plant.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2