Sayyiduna Ibn Abbas (may Allah be pleased with him) states that the Messenger of Allah (peace and blessings be upon him) said: "When the judge sits in his place, two angels keep him upright and guide him, as long as he does not commit injustice. When he commits injustice, they both ascend and leave him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20166