Abu Yusuf (may Allah have mercy on him) said: When Sawwar, the judge of Basrah, died, Abu Ja'far al-Mansur summoned Abu Hanifah (may Allah have mercy on him) and said: Sawwar, the judge of Basrah, has died, and this city needs a judge. I am entrusting the office of judge to you, so accept it. Abu Hanifah (may Allah have mercy on him) said: By Allah! I am not fit for the office of judge. O Commander of the Faithful! If I am telling the truth, then it is not proper to give the office of judge to a man who is not fit for it; and if I am lying, then do not give the office of judge to a liar. This office suits some Arab man; I will oppose you. The narrator said: Al-Mansur said: You have spoken the truth that those fit for this office were people like Abu Bakr and Umar (may Allah be pleased with them both). "That was a nation which has passed away; for them is what they earned." [Surah al-Baqarah: 134] As for your saying that the Arabs are fit for it, Allah Almighty says: "Indeed, the most honoured of you in the sight of Allah is the most righteous of you." [Surah al-Hujurat: 13] We are only to strive among the people of our own time. And as for your saying that you have taken up opposition to me, one opinion may differ from another, so accept this matter. Abu Hanifah (may Allah have mercy on him) said: O Commander of the Faithful! Let me go, otherwise I will begin the talbiyah right here, this very hour, and then it will not be permissible for you to imprison one who is reciting the talbiyah. The narrator said: So he let him go.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20237