Abd al-Rahman bin Ghanm narrates from Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) that he said: Woe to the judges of the earth from the One who is in the heavens; on the Day of Resurrection, (before) the One who takes account, only those who acted justly will be safe: those who judged by the truth and did not let desire, kinship, greed or fear get in the way, and kept the Book of Allah before them like a mirror.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20359