When David was settled into his palace, he said to the prophet Nathan, "I'm living in a cedar palace while the chest containing the LORD's covenant is under curtains."
Nathan replied, "Go ahead and do whatever you are thinking, because God is with you."
But that very night God's word came to Nathan:
Go to my servant David and tell him, This is what the LORD says: You are not the one to build the temple for me to live in.
In fact, I haven't lived in a temple from the day I brought Israel out until this very day. I've been traveling from tent to tent and from dwelling to dwelling.
Throughout my traveling with the Israelites, did I ever ask one of Israel's tribal leaders, whom I appointed to shepherd my people, Why haven't you built me a cedar temple?
So then, say this to my servant David: This is what the LORD of heavenly forces says: I myself took you from the pasture, from following the flock, to be leader over my people Israel.
I've been with you wherever you've gone. I've eliminated all your enemies before you. Now I will make your name great—like the name of the greatest people on earth.
I'm going to provide a place for my people Israel, and plant them so that they may live there and no longer be disturbed. Cruel people will no longer trouble them as they did earlier,
when I appointed judges over my people Israel. I'll subdue all your enemies and make you great. As for a dynasty, the LORD will build one for you!
When the time comes for you to die, I will raise up a descendant of yours after you, one of your own sons, to succeed you, and I will establish his kingship.
He is the one who will build me a temple, and I will establish his throne forever.
I will become his father and he will become my son, and I'll never withdraw my faithful love from him as I did from the one before you.
I'll install him in my house and in my kingdom forever, and his throne will be established forever.
Nathan faithfully reported all that he had seen and heard to David.
Then King David went and sat in the LORD's presence. He asked: Who am I, LORD God, and of what significance is my family that you have brought me this far?
But even this was too small in your eyes, God. You have spoken about the future of your servant's dynasty and have chosen me as an important person, LORD God.
What more can I say to you for honoring your servant? You yourself know your servant.
LORD, for your servant's sake and according to your will, you have done this great thing in order to make all these great things known.
LORD, no one can compare to you, no God except you, just as we have heard with our own ears.
Who is like your people Israel, a unique nation on the earth, that God redeemed as his own people, establishing a name for yourself by doing great and awesome things, by driving out nations before your people whom you saved from Egypt?
You established your people Israel as your own people forever, and you, LORD, became their God.
Now, LORD, confirm forever the promise you have made about your servant and his dynasty. Do as you have promised
so that it may be established and so that your name may be made great forever when people say, "The LORD of heavenly forces, the God of Israel, is Israel's God." May your servant David's household be established before you.
You, my God, have revealed to your servant that you will build him a dynasty. That is why your servant has found the courage to pray this prayer to you.
LORD, you are truly God, and you promised this good thing to your servant.
So now willingly bless your servant's dynasty so that it might continue forever before you, because you, LORD God, have promised. Let your servant's dynasty be blessed forever by your blessing.