Jami` at-Tirmidhi, Book 15, Hadith 5 (Tirmidhi 1338)

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."