Solomon Ibn Gabirol said this quote

Kings may be judges of the earth, but wise men are the judges of kings.