Anas bin Malik (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) saying: "Whoever seeks the office of judge and seeks help for it will be left to it. And whoever neither seeks it nor seeks help for it, Allah appoints over him an angel who helps him and keeps him upright."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20249