Praise be to Allah.
The Prophet (blessings and peace of Allah be upon him) enjoined us to flee from lepers, as was narrated by Ahmad (9720) in a hadith of Abu Hurayrah who said: I heard the Messenger of Allah (blessings and peace of Allah be upon him) saying: “Flee from the leper as you would flee from a lion.” Classed as saheeh by Shu‘ayb al-Arna’oot in Tahqeeq al-Musnad. It was also narrated by al-Bukhaari in his Saheeh, in a mu‘allaq report.
This comes under the heading of avoiding causes of sickness and health troubles, because leprosy may be transferred to a healthy person by Allah’s leave, or it may not be transferred, so prudence dictates avoiding it.
Hence the fuqaha’ stated that the leper should be prevented from mixing with healthy people except with their permission.
It says in Kashshaaf al-Qinaa‘ (6/126): Generally speaking, it is not permissible for lepers to mix with healthy people, or to mix with a specific healthy person except with his permission. Those who are in authority must prevent them from mixing with healthy people, by accommodating them in a place allocated specifically for them, and the like. If those in authority, or the leper, refuse to do that, then they are sinning, and if someone persists in not doing what is obligatory when they are aware of it, then they are committing evil (fisq). He [Shaykh al-Islam] stated this in al-Ikhtiyaaraat. And he said: This was the Sunnah [practice] of the Messenger of Allah (blessings and peace of Allah be upon him) and his successors [the caliphs], as the scholars have noted. End quote.
In al-Mawsoo‘ah al-Fiqhiyyah (15/131) it says: The Maalikis, Shaafa‘is and Hanbalis are of the view that the leper who may cause harm and distress should be prevented from mixing with healthy people and meeting people, because of the hadith, “Flee from the leper as you would flee from a lion.”
The Hanbalis said: It is not permissible for a leper to mix with a healthy person except with his permission. If the healthy person gives a leper permission to mix with him, then it is permissible for him to do that, because of the hadith: “There is no ‘adawa (contagion except by the will of Allah) and no tiyarah (superstitious belief in bird omens).”
We have not found any statement from the Hanafis concerning this issue.
If the number of lepers is great, then the majority of scholars say that they should be instructed to isolate themselves in places far away from people, but they should not be prevented from taking care of their needs. And it was said that it is not essential for them to isolate themselves.
If the people of a village among whom there are lepers fear that they will be harmed by mixing with them at a shared water source, if the lepers are able to dig another water source without too much trouble, they should be instructed to do that, otherwise other people should dig it for them, or appoint someone to provide water for them, otherwise they should not be prevented. End quote.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: The ruler should isolate lepers from healthy people, i.e., quarantine. That is essential, and it is not regarded as mistreating them; rather it comes under the heading of taking precautions against the harm they could cause, because the Prophet (blessings and peace of Allah be upon him) said: “Flee from the leper as you would flee from a lion.”
This hadith appears to contradict the words of the Prophet (blessings and peace of Allah be upon him), “There is no ‘adawa (contagion except by the will of Allah) and no tiyarah (superstitious belief in bird omens).” That may sound right, because if there is no contagion, then what harm will it do us if there is a leper among us?
But the scholars (may Allah have mercy on them) responded by noting that the contagion that the Prophet (blessings and peace of Allah be upon him) was referring to when he said that there is no contagion is the contagion that the people of the Jaahiliyyah believed in and thought that it would inevitably infect others. Hence when the Bedouin said, “How can there be no contagion, when the camels may be healthy like deer, then a mangy camel comes and mixes with them and they all get the mange?” the Prophet (peace and blessings of Allah be upon him) said: “And who infected the first one?”
The answer is that the one who caused the first one to get the mange was Allah, so the contagion that spreads from the mangy camel to the healthy camel occurs by the decree of Allah, may He be glorified and exalted, for everything happens by the decree of Allah, may He be blessed and exalted.
With regard to the words of the Prophet (blessings and peace of Allah be upon him), “Flee from the leper,” this is a command to avoid causes of health problems, because Islamic teachings forbid exposing oneself to destruction.
Hence if one’s trust in Allah, may He be exalted, is strong, there is nothing wrong with mixing with the leper, because one day the Prophet (blessings and peace of Allah be upon him) took the hand of a leper and said to him: “Say Bismillah (in the name of Allah)” [Narrated by Abu Dawood and at-Tirmidhi], and ate with him, because of his strong trust in Allah. No matter how contagious leprosy is, if Allah, may He be glorified and exalted, prevents it from spreading, it is not possible for it to spread.
End quote from ash-Sharh al-Mumti‘ (11/120).
See also the answer to question no. 175379.
Thus it becomes clear that there is no blame on the one who mixes with a leper, especially if his trust in Allah is strong, and especially if there is a need for that, such as if the leper needs that person, such as a doctor and the like, and the one who mixes with him takes precautions to avoid contagion, by following all possible preventative medical protocols.
And Allah knows best.