(Devarim 12:10) "And you will cross the Jordan and you will dwell in the land … (11) and the place that the L-rd your G-d will choose, etc." R. Yehudah says: Three mitzvoth were commanded to Israel upon their entrance to the land: to appoint a king over them, to build the Temple, and to cut off the seed of Amalek, and I would not know which takes precedence; it is, therefore, written (Shemoth 17:16) "For a hand upon the throne of the L-rd: The L-rd shall war against Amalek." When the king sits upon the throne of the L-rd, cut off the seed of Amalek. And whence is it derived that "the throne of the L-rd" refers to the king? From (I Chronicles 29:23) "And Solomon sat on the throne of the L-rd as a king." And I still would not know which preceded — the building of the Temple or the cutting off of the seed of Amalek? It is, therefore, written (Devarim, Ibid .) "… and you will dwell in the land that the L-rd your G-d causes you to inherit, and He gives you rest from all of your foes roundabout and you will dwell secure (only then ) (11) the place that the L-rd your G-d shall choose (i.e., the Temple) etc." And it is written (II Samuel 7:1-2) "And it was, when the king (David) dwelt in his house and the L-rd had given him rest roundabout from all of his foes, that the king said to Nathan the prophet: See now, I am living in a house of cedar while the ark of G-d dwells within the curtain, etc."
Sifrei Devarim 67
Tap any verse to see what it echoes — and start a chain or echo from it.