from Him by His Prophet, peace and blessings be upon him:
“O My servants, I have forbidden injustice for Myself and have made it forbidden among you, so do not wrong one another.”
If someone commits an offence, he may not be punished except with a punishment prescribed by Islamic law. No student, nor either of the two masters, may punish him however he wishes. Nor may anyone assist him or go along with him in doing so—for example, by obeying his order to shun someone who has committed no offence under Islamic law, or by saying, “I have sidelined him,” or “I have stripped him of standing,” or something similar. This resembles what priests and monks do among Christians, and what the hazābūn (Jewish religious authorities) do among Jews. It also resembles what leaders of misguidance and error do with their followers.
Al-Siddīq, the successor of the Messenger of Allah, peace and blessings be upon him, in leading his community, said:
“Obey me so long as I obey Allah. If I disobey Allah, you owe me no obedience.”
The Prophet, peace and blessings be upon him, said:
“No created being may be obeyed in disobedience to the Creator.”
He also said:
“If anyone commands you to disobey Allah, do not obey him.”
Thus, if a teacher or master orders someone to be shunned, stripped of standing, discredited, excluded, or treated similarly, the matter must be examined. If that person has committed an offence under Islamic law, he is to be punished in proportion to his offence, without excess. If he has committed no such offence, he may not be subjected to any punishment merely to serve the purposes of the teacher or anyone else. Teachers may not divide people into factions or do anything that sows enmity among them