Now it came to pass, when David was dwelling in his house, that David said to Nathan the prophet, "See now, I dwell in a house of cedar, but the ark of the covenant of the Lord is under tent curtains."
Then Nathan said to David, "Do all that is in your heart, for God is with you."
But it happened that night that the word of God came to Nathan, saying,
"Go and tell My servant David, 'Thus says the Lord: "You shall not build Me a house to dwell in.
For I have not dwelt in a house since the time that I brought up Israel, even to this day, but have gone from tent to tent, and from one tabernacle to another.
Wherever I have moved about with all Israel, have I ever spoken a word to any of the judges of Israel, whom I commanded to shepherd My people, saying, 'Why have you not built Me a house of cedar?' " '
Now therefore, thus shall you say to My servant David, 'Thus says the Lord of hosts: "I took you from the sheepfold, from following the sheep, to be ruler over My people Israel.
And I have been with you wherever you have gone, and have cut off all your enemies from before you, and have made you a name like the name of the great men who are on the earth.
Moreover I will appoint a place for My people Israel, and will plant them, that they may dwell in a place of their own and move no more; nor shall the sons of wickedness oppress them anymore, as previously,
since the time that I commanded judges to be over My people Israel. Also I will subdue all your enemies. Furthermore I tell you that the Lord will build you a house.
And it shall be, when your days are fulfilled, when you must go to be with your fathers, that I will set up your seed after you, who will be of your sons; and I will establish his kingdom.
He shall build Me a house, and I will establish his throne forever.
I will be his Father, and he shall be My son; and I will not take My mercy away from him, as I took it from him who was before you.
And I will establish him in My house and in My kingdom forever; and his throne shall be established forever." ' "
According to all these words and according to all this vision, so Nathan spoke to David.

Then King David went in and sat before the Lord; and he said: "Who am I, O Lord God? And what is my house, that You have brought me this far?
And yet this was a small thing in Your sight, O God; and You have also spoken of Your servant's house for a great while to come, and have regarded me according to the rank of a man of high degree, O Lord God.
What more can David say to You for the honor of Your servant? For You know Your servant.
O Lord, for Your servant's sake, and according to Your own heart, You have done all this greatness, in making known all these great things.
O Lord, there is none like You, nor is there any God besides You, according to all that we have heard with our ears.
And who is like Your people Israel, the one nation on the earth whom God went to redeem for Himself as a people--to make for Yourself a name by great and awesome deeds, by driving out nations from before Your people whom You redeemed from Egypt?
For You have made Your people Israel Your very own people forever; and You, Lord, have become their God.
"And now, O Lord, the word which You have spoken concerning Your servant and concerning his house, let it be established forever, and do as You have said.
So let it be established, that Your name may be magnified forever, saying, 'The Lord of hosts, the God of Israel, is Israel's God.' And let the house of Your servant David be established before You.
For You, O my God, have revealed to Your servant that You will build him a house. Therefore Your servant has found it in his heart to pray before You.
And now, Lord, You are God, and have promised this goodness to Your servant.
Now You have been pleased to bless the house of Your servant, that it may continue before You forever; for You have blessed it, O Lord, and it shall be blessed forever."
1 Chronicles 17