Jami` at-Tirmidhi #1325
The Chapters On Judgements From The Messenger of Allah 15:5
Abu Hurairah narrated that the Messenger of Allah (ﷺ) said:
"Whoever takes the responsibility of judge, or is appointed as judge between the people, then he has been slaughtered without a knife."