not expelling him from the fold of Islam, for that depends on the condition of the judge. If he believes that ruling by what Allah has revealed is not obligatory and that he is free in the matter; or he belittles Allah’s ruling, holds that man-made statutes and regulations are superior, that the divine law is unfit for our time, or he judges by other than what Allah has revealed merely to placate the disbelievers and the hypocrites—then this is major disbelief.
If, however, he acknowledges that ruling by what Allah has revealed is obligatory, knows the divine ruling in this particular case, yet deliberately departs from it while admitting that he deserves punishment, he is a sinner and is described as a disbeliever with minor disbelief.
Should he be ignorant of Allah’s ruling in the matter, yet exert his utmost effort to discover it and still arrive at the wrong conclusion, he is simply mistaken; he receives a reward for his ijtihād and his error is forgiven (1).
This concerns judgment in an individual case. As for judgment in matters that affect the public at large, the ruling differs. Shaykh al-Islām Ibn Taymiyyah (2) said: “If a judge is devout but rules without knowledge, he is among the people of Hellfire. If he possesses knowledge yet rules contrary to the truth he knows, he is among the people of Hellfire. And if he rules without justice or knowledge, he is even more deserving to…"