Psalm of Ascents. Remember, O Lord, for David all his afflictions. If your children will keep my covenant. Three things were given on condition: the land of Israel, the Temple, and the kingdom of the House of David.

Except for the book of Torah and the covenant of Aaron, which were not given on condition. How do we know the land of Israel was given on condition? As it is said, "Take heed to yourselves, lest your heart be deceived, and you turn aside and serve other gods and worship them, and the Lord's anger be kindled against you, and He shut up the heaven, etc." How do we know the Temple was given on condition?

As it is said, "This house which you are building, if you will walk in My statutes, and execute My ordinances, and keep all My commandments to walk in them; then will I establish My word with you, which I spoke to David your father, etc." But if not, "This house shall become a heap of ruins, etc." How do we know the kingdom of the House of David was given on condition? As it is said, "If your children will keep My covenant, etc." And it is also said, "Then will I visit their transgression with the rod, etc." How do we know that the book of Torah was not given on condition?

As it is said, "Moses commanded us a law, an inheritance of the congregation of Jacob." How do we know that the covenant of Aaron was not given on condition? As it is said, "It is an everlasting covenant of salt before the Lord, etc." And it is also said, "And it shall be to him and to his seed after him a covenant of an everlasting priesthood, etc." This is my resting place forever and ever. The Rabbis taught (Deuteronomy 12:9), "For you have not yet come to the rest and so on."

This is referring to Shiloh. Why is it called "rest" when they rested from conquering the land? This refers to the inheritance, which is Jerusalem. As it says (Jeremiah 12:8), "My inheritance has become to me like a lion in the forest," and it says (ibid. 12:7), "The bird of prey in the air has declared it against me; therefore I have loved it."

These are the words of Rabbi Yehuda. Rabbi Shimon says that "rest" refers to Jerusalem, as it says (Isaiah 11:10), "And His resting place shall be in Zion." And it says (Psalm 132:14), "This is My resting place forever." Why is it called "rest" in reference to the ark settling?

This refers to Shiloh, as it is written (Joshua 18:1), "And Joshua cast lots for them in Shiloh before the Lord." Rabbi Yishmael says that both Shiloh and Jerusalem are referred to as "rest." Rabbi Shimon ben Yochai says that both Shiloh and Jerusalem are referred to as "rest," but once Jerusalem was chosen, the land of Israel was only fit for altars, as it says (Deuteronomy 12:13), "Take heed to yourself that you do not offer your burnt offerings in every place that you see."

Until the eternal house (i.e. the Temple) was not yet chosen, Jerusalem was fitting for the divine presence. From when it was chosen, Jerusalem emerged, as it is said "For the Lord has chosen Zion" (Psalms 132:13) and "This is My resting place forever; Here I will dwell, for I have desired it" (Psalms 132:14). Until Aaron was not yet chosen, all of Israel was fitting for the priesthood. From when Aaron was chosen, Israel emerged, as it is said "It is an everlasting covenant of salt before the Lord for you and your descendants with you" (Numbers 18:19) and "It shall be for him and his descendants after him a covenant of an everlasting priesthood" (Numbers 25:13).

Until David was not yet chosen, all of Israel was fitting for the monarchy. From when David was chosen, Israel emerged, as it is said "Do you not know that the Lord God of Israel gave the kingship over Israel forever to David and his sons by a covenant of salt?" (2 Chronicles 13:5). Until the Land of Israel was not yet chosen, all lands were fit for divine communication.