When David had settled into his palace, he said to Nathan the prophet, "Look! I am living in a cedar house while the ark of the Lord's covenant is under tent curtains."
So Nathan told David, "Do all that is on your heart, for God is with you."
But that night the word of God came to Nathan:
"Go to David My servant and say, 'This is what the Lord says: You are not the one to build Me a house to dwell in.
From the time I brought Israel out of [Egypt] until today I have not lived in a house; instead, I have moved from tent to tent and from tabernacle [to tabernacle].
In all My travels throughout Israel, have I ever spoken a word to even one of the judges of Israel, whom I commanded to shepherd My people, asking: Why haven't you built Me a house of cedar?'
"Now this is what you will say to My servant David: 'This is what the Lord of Hosts says: I took you from the pasture and from following the sheep, to be ruler over My people Israel.
I have been with you wherever you have gone, and I have destroyed all your enemies before you. I will make a name for you like that of the greatest in the land.
I will establish a place for My people Israel and plant them, so that they may live there and not be disturbed again. Evildoers will not continue to oppress them as they formerly have
ever since the day I ordered judges to be over My people Israel. I will also subdue all your enemies. " 'Furthermore, I declare to you that the Lord Himself will build a house for you.
When your time comes to be with your fathers, I will raise up after you your descendant, who is one of your own sons, and I will establish his kingdom.
He will build a house for Me, and I will establish his throne forever.
I will be a father to him, and he will be a son to Me. I will not take away My faithful love from him as I took it from the one who was before you.
I will appoint him over My house and My kingdom forever, and his throne will be established forever.' "
Nathan recounted all these words and this entire vision to David.