Question: From whom is it obligatory or permissible to show hatred or abandon for the sake of Allaah, the Exalted. And what are the conditions under which one hates such a person or abandons him for the sake of Allaah, the Exalted. And does one who leaves prayer fall under this category of abandonment or not. And when the person who is being shunned gives salaams, is it obligatory for the one shunning him to return salaams or not. And what is the duration of such hatred and shunning for the sake of Allaah, is it as long as one is certain that the attributes, which require hatred and shunning, are present, or is there a fixed limit for it? If so, then what are its regulations, please explain how it works.”
Answer: The hijraah of the Sharee’ah is of two types:
i. Meaning to leave evil
ii. With the meaning of punishment for the evil being done
ii. With the meaning of punishment for the evil being done
As for the first, it is mentioned in the saying of Allaah (سبحانه وتعالى):
“And when you (Muhammad (صلى الله عليه وسلم) see those who engage in a false conversation about Our Verses (of the Qur’aan) by mocking at them, stay away from them till they turn to another topic. And if Shaytaan (Satan) causes you to forget, then after the remembrance sit not you in the company of those people who are the Dhaalimoon (polytheists and wrongdoers, etc).” - Al-An’aam (6):68
And the saying of Allaah (سبحانه وتعالى):
“And it has already been revealed to you in the Book (this Qur’aan) that when you hear the Verses of Allaah being denied and mocked at, then sit not with them, until they engage in a talk other than that; (but if you stayed with them) certainly in that case you would be like them. Surely, Allaah will collect the hypocrites and disbelievers all together in Hell…” - An-Nisaa’ (4):140
So these mean that one is not to witness al-Munkaaraat (the evil deeds) without necessity. Like the people who drink intoxicants or sitting with them, or people who invite to feast in which intoxicants or wind instruments are common. It is not obligatory to accept their invitation or their likes. The difference is over one who attends them intending only to abject to such behavior, or by other than his own choice. And for this is the saying, ‘One who witnesses evil is like the one who does it’ and the hadeeth,
“Whoever believes in Allaah and the Last Day, let him not sit at the table in which Khamr is drunk.” 
This type of Hijrah is that in which one removes himself from doing evil. As he (صلى الله عليه وسلم) said,
“The Muhaajir is one who migrates from what Allaah has forbidden him from.” (Saheeh Al-Bukhaaree)
This is the topic of migration from the lands of Kufr (disbelief) and Tamarrud (disobedience) to the lands of Islaam and Eemaan, a migration from living among the disbelievers and hypocrites for one who is incapable of doing what Allaah has ordered him to do, as Allaah has said,
“And keep away from Ar-Rujz (the idols)!” - Al-Muddaththir (74):5
The second type is hijrah with the aim of discipline. It is abandoning the one who displays evil, abandoning him until he repents from it as the Prophet (صلى الله عليه وسلم) and the Muslims abandoned the three who stayed home until Allaah revealed that they had repented when without an excuse they did not go out for jihaad for which they were called. And hijrah is not made of one who demonstrates good, even if he is a hypocrite. So here hijrah holds the status of punishment (at-Ta’zeer). And at-Ta’zeer is for anyone who abandoned an obligatory duty, or does what is forbidden, like abandoning obligations such as prayer, zakaat, or establishing oppression and immorality, and inviting to innovation, which contradicts the Book and the Sunnah and the consensus of the Imaams of the Salaf - that which is clearly innovation.
This is the correct saying among sayings of Imaams of the Salaf: That is that testimony is not accepted from those who call to innovation, nor are they to be prayed behind, nor is knowledge to be taken from them, nor are they to be married. This is the punishment for them until they refrain. And here they make a distinction between the one who invites to it and the one who does not, because the one who invites spreads the evil, so he deserves the punishment. The case is opposite with the one who is discrete about it, for he is no more evil than the hypocrites whose outward appearance the Prophet (صلى الله عليه وسلم) accepted, entrusted their intent with Allaah, although he was cognizant of the condition of many of them. Similar is the hadeeth:
“When a sin is hidden, it harms no one but the one who does it. But if it is publicized, and not objected to, then everyone is harmed.” 
And that is because the Prophet (صلى الله عليه وسلم) said,
“Surely when people see an evil and do not change it, then Allaah is quick to reach them all with a punishment from Him.” (Reported by Ahmad, Abu Dawood and others)
So correcting evil is obligatory when it is apparent, contrary to the hidden type. For punishment of it is reserved only for the one who does it.
Hijrah differs depending upon the strength or weakness of the Believer, the good that is more preponderate, and circumstances of place and time.
This hijrah differs for the people who perform it depending upon their strength, their weakness, and their numbers, large or small. The aim of it is to scold the one who is abandoned and discipline him and save the society from a similar outcome. So if the good in doing so is more preponderate as far as one can ascertain, then hijrah until the evil is weakened and diminishes is permissible. But if the one abandoned or others cannot leave the evil but increase in evil due to the treatment, or the one abandoning is weak, so much so that it is improbable that the good will prevail, then hijrah is not allowed.
Rather, being friendly to some people is more beneficial than shunning them. And shunning is more beneficial with some people than friendliness. The Prophet (صلى الله عليه وسلم) was friendly with some people while he abandoned others. As in the case of the three who stayed home, they were better than many others whom he was friendly with. This is because those people held the reigns of obedience over their tribesmen. So the religion derived the most benefit from softening their hearts. And these people, they were believers and there were many other believers like them, so by shunning them, the religion became fortified and this helped to purify them from their sins. This is similar to waging war sometimes and making treaties of peace at other times. All of this depends upon the situation and the good expected. And the answers of the Imaams like Ahmad and others regarding this topic are based on this principle.
The same distinction occurs between locations in which innovation is predominant; like the concept of al-Qadariyyah in Basrah, astrology in Khurasaan, Shi’ism in Koofah, and other areas that do not have these problems. There is also a distinction between the people pf power and those other than them.
When this is clear, then the hijrah of the Sharee’ah is among those deeds which Allaah and His Messenger (صلى الله عليه وسلم) command. So obedience in it must be sincere for Allaah and in conformity with His command. Then if it is sincere for Allaah it is correct. But, whoever makes hijrah due to his own desires or he makes hijrah other than what has been commanded, then his hijrah is not included here. The more the souls act according to their desire, the more doubt there is that it is being done out of obedience to Allaah.
Now hijrah for the sake of oneself is not allowed for more than three days, as is found in the Saheehayn that the Prophet (صلى الله عليه وسلم) said,
“A Muslim is not allowed to abandon his brother for more than three days - they meet, and one turns away from the other. The best of them is he who gives the Salaam.”
So permission for this hijrah does not extend beyond three days, just as permission to marry additional wives does not extend beyond three. In the Saheehayn, the Prophet (صلى الله عليه وسلم) is reported to have said,
“The gates of paradise are opened every Monday and Thursday, so all worshippers who did not associate anything with Allaah are forgiven, except for a man whom between he and his brother is a grudge. It is said, ‘Detain these two until they reconcile.’”
Such abandoning of ones rights is prohibited, there is only an allowance for some people, like in the case of the wife, her husband abandoning her bed when she rebels is like the allowance to abandon for three days.
Here it is necessary to distinguish between the hijrah which is Allaah’s right, and the hijrah which is one’s own right. The first of them is something that is commanded, and the second is something that is commanded, and the second is something forbidden, because the believers are brethren. In an authentic hadeeth it is reported that the Prophet (صلى الله عليه وسلم) said,
“Do not cut one another off, do not turn away from one another, do not hate one another, and do not envy one another, be the brethren of Allaah’s servants, the Muslim is the brother of his fellow Muslim.” (Saheeh al-Bukhaaree)
In a hadeeth from the Sunan, he (صلى الله عليه وسلم) said,
“Shall I inform you of more virtue than numerous acts of prayer, fasting, charity and commanding good and forbidding evil?” They (the Companions) said, ‘Yes! O’ Messenger of Allaah!’ He said, “Reconcile enmity, for enmity is the razor, I do not mean that which shaves off hair, but the one that shaves off the religion.” (Recorded by at-Tirmidhi, Abu Dawood, Ahmad and others)
In an authentic hadeeth he (صلى الله عليه وسلم) said,
“The similitude of the believers’ love, mercy and kindness with one another is like that of one body. When one of its members suffers, the rest of the body is affected by fever and sleeplessness.” (Saheeh Muslim)
This is so because hijrah is among the legislated punishments. It is a type of jihaad in Allaah’s path. It is done so that Allaah’s word is supreme and so the entirety of the religion is for Him. The believer is required to make enmity for Allaah’s sake, and to befriend for Allaah’s sake, so much so that the believer is required to maintain the friendship even if he is oppressed. For oppression does not sever the allegiance of fait. Allaah, The Most High said,
* “And if two parties or groups among the believers fall to fighting, then make peace between them both, but if one of them rebels against the other, then fight you (all) against the one that which rebels till it complies with the Command of Allâh; then if it complies, then make reconciliation between them justly, and be equitable. Verily! Allâh loves those who are equitable. The believers are nothing else than brothers (in Islaamic religion).”* - Al-Hujuraat (49):9-10
He renders them brothers even while they are fighting and committing oppression and He commands reconciliation between them.
So the believer must distinguish between these two types. Which has more doubt in it than the other? Then know that your allegiance is obligatory to the believer, even if you are oppressed or attacked, and your enmity of the disbeliever is obligatory even if he is beneficent and is good to you. For Allaah, Glorious is He who sent the Messenger and revealed the Book so that the entirety of the religion be for Allaah, so love is for His allies and enmity is for His enemies, reward is for His allies, and punishment is for His enemies.
Now if both good and evil are present in a man, both sin and obedience, disobedience, Sunnah, and innovation: He has the right to allegiance and friendship in proportion to his goodness, and the right to enmity and punishment according to his evil. So it may be that one personality possesses what warrants both honor and dishonor, he possesses some of this and some of that like the poor thief whose hand is cut off for what he has stolen but he is given what will satisfy his needs from charity.
These are the fundamentals, which are agreed upon by Ahlus Sunnah wal-Jamaa’ah, whereas the Khawaarij, the Mu’tazilah and those of similar thinking differ. For them the people are either deserving of absolute reward or absolute punishment. But Ahlus Sunnah say: “Allaah punishes some people for major sins in the Fire, then they are taken out of it by means of the intercession of those whom He permits to intercede by virtue of His Mercy, as is elaborated upon by the Sunnah of the Prophet (صلى الله عليه وسلم).”
And Allaah, Glorious is He and Most High, knows best. O Allaah make mention of Muhammad and his family and his companions.
 A Hasan hadeeth, recorded by at-Tirmidhi (#2801) from Jaabir that the Prophet (صلى الله عليه وسلم) said, “Whoever believes in Allaah and the last Day, then let him not enter the (public toilet) without having his waste wrapped. And whoever believes in Allaah and the Last Day let him not allow his wife to enter the (public toilet). And whoever believes in Allaah and the last day, let him not sit at a table in which Khamr is circulated.” at-Tirmidhi said it is Hasan Ghareeb, and in its chain is Layth bin Abee Saleem who is truthful according to most but sometimes there is concern about him as an-Nukhaari said. There is another route for it with al-Haakim which strengthens it.
 The meaning of the hadeeth is reported by Ahmad 94/192), Ibn al-Mubaarak in az-Zuhd #1352, at-Tabraani in al-Kabeer (17/130) and at-Tahaawi in Mushkil al-Athaar (2/66), al-Baghawi in Sharh us-Sunnah (14/346), from ‘Adiy bin ‘Adiy al-Kindi who said, “Our freed slave said that he heard my grandfather saying, ‘I heard Allaahs Messenger (صلى الله عليه وسلم) saying, “Allaah does not chastise everyone for actions of some until they see evil in their midst and they are able to rebuke it but do not. When they do this Allaah punishes the masses as well as individuals (who sinned).”