When you come to the land that the Eternal your God is giving you, and you possess it and settle in it, and you say, ‘I will set a king over me like all the nations around me,’
English: Our Rabbis taught: Three commandments were given to Yisrael upon their entry into the Land: to appoint a king for themselves, to wipe out the seed of Amalek, and to build for themselves the Chosen House (the Temple).
On the daf / in context: Sanhedrin 20b discusses the sequence and obligatory nature of these three mitzvos that apply specifically after entering Eretz Yisrael. The baraita is the classic source for the mitzvah of appointing a king.
Type of Learning
Derash on the verse (Bavli sugya) — the baraita derives three independent mitzvos from the Torah’s language about entry into the Land and kingship.
What Is Learned
Upon entering the Land, Yisrael are commanded three things: appoint a king, eradicate Amalek, and build the Beis HaMikdash. The appointment of a king is one of the foundational mitzvos of the Land.