If, however, he seeks the office for status and self-aggrandizement, then it is disliked according to one report, because seeking distinction in worldly life is disliked. Allah Most High says: “That home of the Hereafter We assign to those who do not desire exaltation upon the earth or corruption. And the outcome is for the righteous.” (Quran 28:83)
Some scholars held that it is not disliked, citing the fact that the Prophet Joseph (peace be upon him) sought authority and stewardship from Pharaoh, saying: “Appoint me over the storehouses of the land; indeed, I am a knowledgeable guardian.” (Quran 12:55)
This does not indicate that seeking office from anyone else is permissible, because Joseph (peace be upon him) was a prophet, protected from injustice and wrongdoing in the duties he undertook. This cannot be assured in the case of anyone else.
As for offering money in order to obtain a judgeship, it is prohibited for both the one who offers it and the one who accepts it, on the basis of what Anas narrated from the Prophet (peace and blessings be upon him): “Allah has cursed the one who gives a bribe and the one who accepts it.” The bribe-giver is the one who offers the bribe, and the bribe-taker is the one who accepts it.
A person who has assumed the office of judge may not accept a gift from someone within his jurisdiction with whom he had no established custom of exchanging gifts, whether that person is a litigant or anyone else, because he might later seek the judge’s intervention against someone in a matter under his jurisdiction. It has also been narrated from the Prophet (peace and blessings be upon him) that he said: “The gifts given to officials are a form of embezzlement.”