Hafs ibn Ghiyath ibn Talq, Abu 'Umar al-Nakha'i al-Kufi.
He learned law from the Imam, and heard Abu Yusuf and al-Thawri.
From him [transmitted] Ahmad ibn Hanbal, Ibn Ma'in, 'Ali ibn al-Madini and most of the Kufans. Dawud ibn Rushayd learned law from him.
al-Rashid appointed him judge of Baghdad in the eastern quarter (al-Sharqiyya), and he was just in his judgements. al-Marzuban came to him — he was Zubayda's agent — over a debt owed to one of the Muslims, and sat down; Hafs made him stand and placed him on an equal footing with the opposing party. He complained to Zubayda, and Zubayda pressed al-Rashid until he dismissed him and appointed Abu Yusuf in his place; so the judgeship of the western side and the eastern side of Baghdad was combined for Abu Yusuf.
Then he appointed him over Kufa, and he remained there thirteen years. When death came to him he fainted. His son said: I wept at his head, and he came to and said: What makes you weep? I said: Your parting, and the office you held, meaning the judgeship. He said: Do not weep, for I never untied the drawstring of my trousers for anything unlawful, and no two litigants ever came before me but I was indifferent as to which of them the judgement went against.
From Muhammad ibn Humayd, who said: 'Abd Allah ibn Idris, Waki' and Hafs were brought to al-Rashid for him to appoint them as judges. When Ibn Idris came in he said "Peace be upon you" and threw himself down as though paralysed; al-Rashid said: There is no merit in this one. As for Waki', (he raised his finger and put it) on his eyes and said: I have not seen with this for a year — meaning his finger — so he excused him? As for Hafs, he said: Were it not for debt and dependants I would not have taken office. He said: I did not take the judgeship until carrion had become lawful for me.
On the day he died he did not leave a dirham behind (and he left nine hundred dirhams of debt). It used to be said: the judgeship was sealed with him. He died in the year one hundred and ninety-four, and al-Hasan ibn Ziyad al-Lu'lu'i was put in his place.
From Bishr ibn al-Walid: Hafs took the judgeship without consulting Abu Yusuf. He said: That weighed on him, and he said to me and to al-Hasan ibn Ziyad: Go through his judgements. When they had looked into them and informed Abu Yusuf, he said: This is of the judging of Ibn Abi Layla. Then he said: Go through the contract formularies and the court records. We did so, and when he looked he said: Hafs and his like are helped by standing in prayer at night. In another transmission: God granted him success through the night prayer.
From Ibn Abi Shayba: he held the judgeship in Kufa for thirteen years and in Baghdad for two years.