Deuteronomy 16:18

Amplified Bible (AMP)
“You shall appoint judges and officers in all your cities (gates) which the Lord your God is giving you, according to your tribes, and they shall judge the people with righteous judgment.

Read Deuteronomy 16:18 in other translations