TT #86 · Parashas Shoftim · Second Aliyah · Passuk 17:15
You shall surely set over yourself a king whom the Eternal your God will choose; from among your brethren you shall set a king over yourself; you may not place over yourself a foreigner who is not your brother.
Torah Temimah points to Sanhedrin 21a / Yevamos 102a.
TT lemma: מִקֶּרֶב אַחֶיךָ.
Sefaria — Sanhedrin 21a / Yevamos 102a
English: Rava said: A convert may judge his fellow convert by Torah law, as it is said ‘from among your brethren you shall set a king over yourself’ – it is only over you that we require ‘from among your brethren,’ but a convert may judge his fellow convert.
Derash on the phrase ‘from among your brethren’ (Bavli) — the limitation applies to authority over native Yisrael, not necessarily among converts.
Positions of coercive authority over Yisrael must be filled by someone from ‘your brethren.’ A convert may still judge another convert.