TT #93 · 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 Sifrei Devarim 156.
TT lemma: כִּי תָבֹא אֶל הָאָרֶץ.
English: Perform the commandment stated in this context, so that in its merit you will enter the Land.
Derash linking mitzvah and reward (Sifrei) — observance of the command regarding a king is presented as a condition for secure entry.
Proper fulfillment of the laws of kingship is bound up with the blessing of settling the Land securely.