One of the companions of Abu Hanifa to whom he said: “You are the joy of my heart and the dispeller of my sorrow.”
He, may God the Exalted have mercy on him, was an excellent imam, a scholar who acted [on his knowledge], an ascetic who abandoned the world; in [upholding] the truth the blame of no blamer took hold of him, and he was one of the luminaries of this community.
He held the judgeship in Baghdad and transmitted hadith there, then he was dismissed; and he had first held the judgeship in Kufa.
Humayd ibn al-Rabi' said: When 'Abd Allah ibn Idris, Hafs ibn Ghiyath and Waki' ibn al-Jarrah were brought to the Commander of the Faithful Harun al-Rashid, so that he might appoint them to judgeships, when they entered upon him, as for Ibn Idris, he said: “Peace be upon you,” and threw himself down as if he were paralysed. Harun said: “Take the shaykh by the hand; there is no good in this one.” As for Waki', he said: “By God, O Commander of the Faithful, I have not seen with it for a year,” and he put his finger on his eye, and he meant his finger, so he excused him. As for Hafs ibn Ghiyath, he said: “Were it not for the burden of debt and dependants, I would not have taken office.”
Ibrahim ibn Mahdi said: I heard Hafs ibn Ghiyath, while he was judge of al-Sharqiyya, say to a man who was asking about questions of judging: “Perhaps you want to become a judge. That a man should put his finger into his eye, pluck it out and throw it away is better for him than that he should become a judge.”
Bishr ibn al-Harith said: I heard Hafs say: “If I saw that I was pleased with what I am in, I would perish.”
It is related from his son 'Umar that he said: When death came to my father he fainted, and I wept at his head. He came to and said: “What makes you weep?” I said: “I weep at parting from you, and at what you entered into of this office.” He said: “Do not weep, for I have never untied my trousers for anything forbidden, and no two litigants ever sat before me and I cared against which of them the judgement went.”
It is related that he was sitting in the session of judgement when the caliph sent to summon him, and he said: “I shall finish the matter of the litigants, since I am their hired servant, and then go to the Commander of the Faithful.” And he did not rise until the litigants had dispersed.
His son related of him that he was ill for fifteen days, and he handed him a hundred dirhams and said: “Take them to the governor and say to him: ‘This is the stipend of fifteen days in which I did not judge between the Muslims; I have no share in it.’”
Yahya ibn al-Layth related, saying: A man from the people of Khurasan sold camels for thirty thousand dirhams to Marzuban the Magian, the agent of Umm Ja'far, and he put him off over their price and detained him. That dragged on for the man, so he came to one of the companions of Hafs ibn Ghiyath and consulted him. He said: “Go to him and say to him: ‘Give me a thousand dirhams, and I will refer [someone] to you for the remaining money, and I will go out to Khurasan.’ If he does this, meet me so that I may advise you.” The man did so and went to Marzuban, and he gave him a thousand dirhams. He returned to the man and told him, and he said: “Go back to him and say: ‘When you ride tomorrow, make your way past the judge so that I may appoint a man before him as agent to receive the money, and I will leave.’ When he sits before the judge, claim against him what remains owing to you of the money; when he acknowledges it, Hafs will imprison him and you will take your money.”
So he went back to Marzuban and asked him about that, and he agreed. When Marzuban appeared at Hafs's session, the man said: “May God set the judge right, this man owes me twenty-nine thousand dirhams.”
Hafs said: “What do you say, Magian?” He said: “He speaks the truth, may God set the judge right.”
He said: “What do you say, man? He has acknowledged [it] to you.” He said: “Let him give me my money, may God set the judge right.”
Hafs turned to the Magian and said: “What do you say?” He said: “This money is owed by the Lady.” He said: “You are a fool: you acknowledge, then you say it is owed by the Lady! What do you say, man?” He said: “May God set the judge right, if he gives me my money [well and good]; otherwise imprison him.” Hafs said: “What do you say, Magian?” He said: “The money is owed by the Lady.” Hafs said: “Take him by the hand to prison.”
When he was imprisoned the news reached Umm Ja'far, and she was angry, and she sent to al-Sindi: “Send Marzuban to me.” The judges used to imprison debtors in the prison, so al-Sindi hastened and released him.
The news reached Hafs, and he said: “I imprison and al-Sindi releases!! I will not sit in this session of mine until Marzuban is returned to prison.”
Al-Sindi came to Umm Ja'far and said: “By God, by God, [have regard] for me! It is Hafs ibn Ghiyath, and I fear that the Commander of the Faithful will say to me: ‘On whose order did you release him?’ Return him to prison, and I will speak to Hafs about his case.” She granted him that, and Marzuban went back to prison. Umm Ja'far said to Harun: “This judge of yours is a fool; he has imprisoned my agent and treated him with contempt. Order him not to look into the case, and to refer his case to Abu Yusuf.” So he ordered the letter for her.
The news reached Hafs, and he said to the man: “Bring me witnesses so that I may record [a judgement] for you against the Magian for the money.” Hafs sat and recorded [it] against the Magian, and Harun's letter arrived with a servant of his, who said: “This is the letter of the Commander of the Faithful.” He said: “Stay where you are; we are busy with something until we finish it.” He said: “The letter of the Commander of the Faithful!” He said: “Look to what you are told.”
When Hafs had finished the record, he took the letter from the servant, read it and said: “Convey greetings of peace to the Commander of the Faithful, and tell him that his letter arrived, and I had already executed the judgement.” The servant said: “By God, I know what you have done: you refused to take the letter of the Commander of the Faithful until you had finished what you wanted. By God, I shall tell the Commander of the Faithful what you have done.” Hafs said: “Tell him whatever you like.”
The servant came and told Harun, and he laughed and said to the chamberlain: “Order thirty thousand dirhams for Hafs ibn Ghiyath.” Yahya ibn Khalid rode out and met Hafs as he was leaving the session of judgement, and said: “O judge, you have pleased the Commander of the Faithful today, and he has ordered thirty thousand dirhams for you. What was the reason for this?” He said: “May God complete the happiness of the Commander of the Faithful and make good his protection and safekeeping. I did no more than what I do every day, and I know of nothing unless it be that I recorded against Marzuban the Magian what was due from him.”
Yahya ibn Khalid said: “It is by this that the Commander of the Faithful was pleased.”
Hafs said: “Praise be to God abundantly.”
Umm Ja'far said to Harun: “Neither I nor you [shall be at ease] unless you dismiss Hafs.” He refused her; then she pressed him, so he dismissed him from al-Sharqiyya and appointed him to the judgeship over Kufa, and he remained in it thirteen years.
Hafs used to say: “By God, I did not take the judgeship until carrion had become lawful for me.”
He died, on the day he died, without leaving a dirham, and he left nine hundred dirhams of debt owing by him.
Bishr ibn al-Walid said: Hafs took the judgeship without the counsel of Abu Yusuf, and that weighed heavily on him. He said to me and to al-Hasan ibn Ziyad: “Go through his judgements.” We went through them, and when he looked at them he said: “This is of the judging of Ibn Abi Layla.” Then he said: “Go through the contracts and the records.” When he looked at them he said: “Hafs and his like are helped by standing [in prayer] at night.”
He related with his chain of transmission from Abu Yusuf that, when Hafs took the judgeship of Kufa, he said to his companions: “Make up a notebook in which to write down the rare slips of his judgements.” But his judgements and rulings passed [straight] like an arrow-shaft, and they said to Abu Yusuf: “Do you not see?” He said: “What can I do against standing at night!!” — he meant that God gave him success in judging through the night prayer.
It is related that a righteous man saw in his sleep as if a boat had sunk between the two bridges with twenty judges in it, and none of them was saved except three with rags over their private parts: Hafs ibn Ghiyath, al-Qasim ibn Ma'n and Sharik.
Hafs would not marry an orphan girl to one who drinks nabidh until he is drunk, nor to a Rafidi. He was asked about that and said: “The Rafidi holds that the three [repudiations] are one, and one who drinks nabidh until he is drunk divorces without knowing.”
Al-Khatib said: Hafs had much hadith, preserving it in memory, reliable in it, and he was also held in high regard by the shaykhs from whom he heard hadith.
Yahya Ma'in said: All that Hafs ibn Ghiyath transmitted in Baghdad and Kufa was only from his memory; he did not bring out a book. They wrote down from him four thousand hadiths from his memory.
The noble deeds of Hafs are many and his virtues well known, and what we have mentioned of them suffices.
He died — may God the Exalted have mercy on him — in the year one hundred and ninety-four; and it is said: ninety-six. His birth was in the year one hundred and seventeen. May God benefit us by the blessings of his sciences in this world and the next. Amen.