alone.
This shunning varies according to the strength or weakness of those who practise it and whether they are few or many. Its purpose is to deter and discipline the person being shunned and to discourage the general public from following his example. If its benefits predominate, such that shunning him leads to evil diminishing and becoming less apparent, then it is prescribed. But if neither the person being shunned nor anyone else is deterred, and evil instead increases, while those practising the shunning are weak, so that its harm outweighs its benefit, then shunning is not prescribed. Rather, winning some people over is more beneficial than shunning them, while shunning others is more beneficial than winning them over.
For this reason, the Prophet, may Allah bless him and grant him peace, would win some people over and shun others. The three who were left behind were better than most of those whose hearts were being won over. The latter were chiefs obeyed within their clans, so the interests of the religion lay in winning their hearts. The former were believers, and there were many other believers; thus shunning them strengthened the religion and purified them of their sins.
Similarly, what is prescribed in dealing with an enemy may sometimes be fighting, sometimes concluding a truce, and sometimes collecting the jizyah (poll tax). All of this depends on the circumstances and the benefits involved.
The answers given by leading scholars such as Ahmad and others on this subject are based on this principle. Hence, he would distinguish between places where innovations had become widespread—as Qadarism had in Basra, astrology in Khurāsān, and Shiism in Kufa—and those where this was not