Deuteronomy 16:18 YLT

18 `Judges and authorities thou dost make to thee within all thy gates which Jehovah thy God is giving to thee, for thy tribes; and they have judged the people -- a righteous judgment.