Afiye b. Yazid b. Qays. He was appointed as judge (qāḍī) to the eastern part of Baghdad by Caliph Mahdi, together with Ibn Ulase. These two would serve as judges in the main mosque, issuing rulings.
BuyūkīBlam history
He was an ʿābid (devout worshipper), ascetic (zāhid), and a person of taqwa (God-consciousness). One day, at noon, he entered the presence of Mahdi and said to him:
– O Commander of the Faithful, excuse me. I wish to resign from this post—
– Why should I excuse you from this post? Did one of the commanders force you?
– No, but two people came to me to litigate. One of them wanted to give me fresh dates as a gift. It was as if he had heard that I liked fresh dates. He offered me a plate of fresh dates, dates that would only be worthy of our caliph. But I did not accept them; I returned them. In the morning, when I went to court and sat down, the two did not appear the same in my heart (qalb) and in my eyes. On the contrary, my heart inclined toward the man who had tried to give me the dates. Even though I did not accept his dates, my heart was partial to him. What would have happened if I had accepted them? O Commander of the Faithful, excuse me from the office of judge. May Allah grant you well-being.
Upon this, Mahdi relieved him of his judicial duties.
Asmaʿī said: One day I was in the presence of Harun al-Rashid, and Afiye b. Yazid was with him. Harun had summoned him to take his statement, because some people had denounced him and lodged complaints against him before Harun al-Rashid. Harun al-Rashid questioned him about what was being said, and he answered the questions. The session went on for some time. At that moment, the caliph Harun sneezed, and everyone said, "Yarḥamukallāh: May Allah have mercy on you." But Afiye did not offer a supplication (dua) of blessing. Harun al-Rashid asked him:
– Why did you not join these men in offering a supplication of blessing for me?
– Because you did not say al-ḥamdu lillāh (praise be to Allah).
To prove the truth of his statement, he recited a hadith on this matter. Harun al-Rashid replied to him:
– Go back to your post. By Allah, the accusations made against you are not found in you. For you did not offer a supplication for me when I sneezed and did not praise Allah; you would not intercede for anyone else either.
Having said this, he reinstated him to his original post with kindness.

