After David was settled in his palace, he said to Nathan the prophet, "Here I am, living in a palace of cedar, while the ark of the covenant of the LORD is under a tent."
Nathan replied to David, "Whatever you have in mind, do it, for God is with you."
That night the word of God came to Nathan, saying:
"Go and tell my servant David, 'This is what the LORD says: You are not the one to build me a house to dwell in.
I have not dwelt in a house from the day I brought Israel up out of Egypt to this day. I have moved from one tent site to another, from one dwelling place to another.
Wherever I have moved with all the Israelites, did I ever say to any of their leaders whom I commanded to shepherd my people, "Why have you not built me a house of cedar?" '
"Now then, tell my servant David, 'This is what the LORD Almighty says: I took you from the pasture and from following the flock, to be ruler over my people Israel.
I have been with you wherever you have gone, and I have cut off all your enemies from before you. Now I will make your name like the names of the greatest men of the earth.
And I will provide a place for my people Israel and will plant them so that they can have a home of their own and no longer be disturbed. Wicked people will not oppress them anymore, as they did at the beginning
and have done ever since the time I appointed leaders over my people Israel. I will also subdue all your enemies. " 'I declare to you that the LORD will build a house for you:
When your days are over and you go to be with your fathers, I will raise up your offspring to succeed you, one of your own sons, and I will establish his kingdom.
He is the one who will build a house for me, and I will establish his throne forever.
I will be his father, and he will be my son. I will never take my love away from him, as I took it away from your predecessor.
I will set him over my house and my kingdom forever; his throne will be established forever.' "
Nathan reported to David all the words of this entire revelation.
Then King David went in and sat before the LORD, and he said: "Who am I, O LORD God, and what is my family, that you have brought me this far?
And as if this were not enough in your sight, O God, you have spoken about the future of the house of your servant. You have looked on me as though I were the most exalted of men, O LORD God.
"What more can David say to you for honoring your servant? For you know your servant,
O LORD. For the sake of your servant and according to your will, you have done this great thing and made known all these great promises.
"There is no one like you, O LORD, and there is no God but you, as we have heard with our own ears.
And who is like your people Israel--the one nation on earth whose God went out to redeem a people for himself, and to make a name for yourself, and to perform great and awesome wonders by driving out nations from before your people, whom you redeemed from Egypt?
You made your people Israel your very own forever, and you, O LORD, have become their God.
"And now, LORD, let the promise you have made concerning your servant and his house be established forever. Do as you promised,
so that it will be established and that your name will be great forever. Then men will say, 'The LORD Almighty, the God over Israel, is Israel's God!' And the house of your servant David will be established before you.
"You, my God, have revealed to your servant that you will build a house for him. So your servant has found courage to pray to you.
O LORD, you are God! You have promised these good things to your servant.
Now you have been pleased to bless the house of your servant, that it may continue forever in your sight; for you, O LORD, have blessed it, and it will be blessed forever."
In the course of time, David defeated the Philistines and subdued them, and he took Gath and its surrounding villages from the control of the Philistines.
David also defeated the Moabites, and they became subject to him and brought tribute.
Moreover, David fought Hadadezer king of Zobah, as far as Hamath, when he went to establish his control along the Euphrates River.
David captured a thousand of his chariots, seven thousand charioteers and twenty thousand foot soldiers. He hamstrung all but a hundred of the chariot horses.
When the Arameans of Damascus came to help Hadadezer king of Zobah, David struck down twenty-two thousand of them.
He put garrisons in the Aramean kingdom of Damascus, and the Arameans became subject to him and brought tribute. The LORD gave David victory everywhere he went.
David took the gold shields carried by the officers of Hadadezer and brought them to Jerusalem.
From Tebah and Cun, towns that belonged to Hadadezer, David took a great quantity of bronze, which Solomon used to make the bronze Sea, the pillars and various bronze articles.
When Tou king of Hamath heard that David had defeated the entire army of Hadadezer king of Zobah,
he sent his son Hadoram to King David to greet him and congratulate him on his victory in battle over Hadadezer, who had been at war with Tou. Hadoram brought all kinds of articles of gold and silver and bronze.
King David dedicated these articles to the LORD, as he had done with the silver and gold he had taken from all these nations: Edom and Moab, the Ammonites and the Philistines, and Amalek.
Abishai son of Zeruiah struck down eighteen thousand Edomites in the Valley of Salt.
He put garrisons in Edom, and all the Edomites became subject to David. The LORD gave David victory everywhere he went.
David reigned over all Israel, doing what was just and right for all his people.
Joab son of Zeruiah was over the army; Jehoshaphat son of Ahilud was recorder;
Zadok son of Ahitub and Ahimelech son of Abiathar were priests; Shavsha was secretary;
Benaiah son of Jehoiada was over the Kerethites and Pelethites; and David's sons were chief officials at the king's side.
In the course of time, Nahash king of the Ammonites died, and his son succeeded him as king.
David thought, "I will show kindness to Hanun son of Nahash, because his father showed kindness to me." So David sent a delegation to express his sympathy to Hanun concerning his father. When David's men came to Hanun in the land of the Ammonites to express sympathy to him,
the Ammonite nobles said to Hanun, "Do you think David is honoring your father by sending men to you to express sympathy? Haven't his men come to you to explore and spy out the country and overthrow it?"
So Hanun seized David's men, shaved them, cut off their garments in the middle at the buttocks, and sent them away.
When someone came and told David about the men, he sent messengers to meet them, for they were greatly humiliated. The king said, "Stay at Jericho till your beards have grown, and then come back."
When the Ammonites realized that they had become a stench in David's nostrils, Hanun and the Ammonites sent a thousand talents of silver to hire chariots and charioteers from Aram Naharaim, Aram Maacah and Zobah.
They hired thirty-two thousand chariots and charioteers, as well as the king of Maacah with his troops, who came and camped near Medeba, while the Ammonites were mustered from their towns and moved out for battle.
On hearing this, David sent Joab out with the entire army of fighting men.
The Ammonites came out and drew up in battle formation at the entrance to their city, while the kings who had come were by themselves in the open country.
Joab saw that there were battle lines in front of him and behind him; so he selected some of the best troops in Israel and deployed them against the Arameans.
He put the rest of the men under the command of Abishai his brother, and they were deployed against the Ammonites.
Joab said, "If the Arameans are too strong for me, then you are to rescue me; but if the Ammonites are too strong for you, then I will rescue you.
Be strong and let us fight bravely for our people and the cities of our God. The LORD will do what is good in his sight."
Then Joab and the troops with him advanced to fight the Arameans, and they fled before him.
When the Ammonites saw that the Arameans were fleeing, they too fled before his brother Abishai and went inside the city. So Joab went back to Jerusalem.
After the Arameans saw that they had been routed by Israel, they sent messengers and had Arameans brought from beyond the River, with Shophach the commander of Hadadezer's army leading them.
When David was told of this, he gathered all Israel and crossed the Jordan; he advanced against them and formed his battle lines opposite them. David formed his lines to meet the Arameans in battle, and they fought against him.
But they fled before Israel, and David killed seven thousand of their charioteers and forty thousand of their foot soldiers. He also killed Shophach the commander of their army.
When the vassals of Hadadezer saw that they had been defeated by Israel, they made peace with David and became subject to him. So the Arameans were not willing to help the Ammonites anymore.