From Deuteronomy 16 (JPS Tanakh 1917):
18: Judges and officers shalt thou make thee in all thy gates, which the LORD thy God giveth thee, tribe by tribe; and they shall judge the people with righteous judgment. 19: Thou shalt not wrest judgment; thou shalt not respect persons; neither shalt thou take a gift; for a gift doth blind the eyes of the wise, and pervert the words of the righteous. 20: Justice, justice shalt thou follow, that thou mayest live, and inherit the land which the LORD thy God giveth thee.