During the rule of the Abbasid King Mahdi, there was a Qazi named Sharīk bin Abdullah. He was an honest and upright Judge, till the time he was summoned by the king. The Abbaside King forced him to choose one from three things :
(1) Either he should accept the post of the Royal Qazi
(2) He should become the teacher of the King’s son
(3) or he should dine with the king, at least once.
The Qazi thought that easiest of the Three was to eat with the king once, so he agreed to dine with King Mahdi. The ruler ordered the royal chef to prepare the best of the dishes. When the Qazi had eaten the food, the cook remarked to his companions, “Now, Qazi Sharīk will never achieve salvation.”
The prediction came to be true. The Harām food affected the Qazi to the extent that he also accepted the other two conditions. He became the special Qazi of the King and the tutor of his children. It is said that Qazi Sharīk used to be very strict and unflinching with the treasurers while obtaining his share from the royal treasury.
One day the treasurer protested, “You have not sold me grain that you act so ruthless in recovering its price.” Qazi Sharīk replied, “Yes, I have sold something more valuable! I have sold my religion.”
One day a tray filled with delicious dishes was sent by Harūn al-Rashīd for Bahlūl. Bahlūl did not accept it. The servants of the king said, “It is not possible to reject the present of the Caliph.” Bahlūl, the wise, pointed towards the stray dogs and said, “Give it to the dogs.”
The servants became angry and said, “You have insulted the royal gifts.” Bahlūl became silent then said, “Be quiet, if the dogs learn that this food is sent by the king, they will not touch it.”