Deuteronomy 16:18

Judges and officers shalt thou make thee in all thy gates, which ... Y-hova giveth thee, tribe by tribe; and they shall judge the people with righteous judgment.