2 Samuel 20-21 (ESV)
The Rebellion of Sheba
20:1 Now there happened to be there a worthless man, whose name was Sheba, the son of Bichri, a Benjaminite. And he blew the trumpet and said,
“We have no portion in David,
and we have no inheritance in the son of Jesse;
every man to his tents, O Israel!”
2 So all the men of Israel withdrew from David and followed Sheba the son of Bichri. But the men of Judah followed their king steadfastly from the Jordan to Jerusalem.
3 And David came to his house at Jerusalem. And the king took the ten concubines whom he had left to care for the house and put them in a house under guard and provided for them, but did not go in to them. So they were shut up until the day of their death, living as if in widowhood.
4 Then the king said to Amasa, “Call the men of Judah together to me within three days, and be here yourself.” 5 So Amasa went to summon Judah, but he delayed beyond the set time that had been appointed him. 6 And David said to Abishai, “Now Sheba the son of Bichri will do us more harm than Absalom. Take your lord’s servants and pursue him, lest he get himself to fortified cities and escape from us.”  7 And there went out after him Joab’s men and the Cherethites and the Pelethites, and all the mighty men. They went out from Jerusalem to pursue Sheba the son of Bichri.8 When they were at the great stone that is in Gibeon, Amasa came to meet them. Now Joab was wearing a soldier’s garment, and over it was a belt with a sword in its sheath fastened on his thigh, and as he went forward it fell out. 9 And Joab said to Amasa, “Is it well with you, my brother?” And Joab took Amasa by the beard with his right hand to kiss him. 10 But Amasa did not observe the sword that was in Joab’s hand. So Joab struck him with it in the stomach and spilled his entrails to the ground without striking a second blow, and he died.
Then Joab and Abishai his brother pursued Sheba the son of Bichri. 11 And one of Joab’s young men took his stand by Amasa and said, “Whoever favors Joab, and whoever is for David, let him follow Joab.” 12 And Amasa lay wallowing in his blood in the highway. And anyone who came by, seeing him, stopped. And when the man saw that all the people stopped, he carried Amasa out of the highway into the field and threw a garment over him.13 When he was taken out of the highway, all the people went on after Joab to pursue Sheba the son of Bichri.
14 And Sheba passed through all the tribes of Israel to Abel of Beth-maacah,  and all the Bichrites  assembled and followed him in. 15 And all the men who were with Joab came and besieged him in Abel of Beth-maacah. They cast up a mound against the city, and it stood against the rampart, and they were battering the wall to throw it down. 16 Then a wise woman called from the city, “Listen! Listen! Tell Joab, ‘Come here, that I may speak to you.’” 17 And he came near her, and the woman said, “Are you Joab?” He answered, “I am.” Then she said to him, “Listen to the words of your servant.” And he answered, “I am listening.” 18 Then she said, “They used to say in former times, ‘Let them but ask counsel at Abel,’ and so they settled a matter. 19 I am one of those who are peaceable and faithful in Israel. You seek to destroy a city that is a mother in Israel. Why will you swallow up the heritage of the Lord?” 20 Joab answered, “Far be it from me, far be it, that I should swallow up or destroy! 21 That is not true. But a man of the hill country of Ephraim, called Sheba the son of Bichri, has lifted up his hand against King David. Give up him alone, and I will withdraw from the city.” And the woman said to Joab, “Behold, his head shall be thrown to you over the wall.” 22 Then the woman went to all the people in her wisdom. And they cut off the head of Sheba the son of Bichri and threw it out to Joab. So he blew the trumpet, and they dispersed from the city, every man to his home. And Joab returned to Jerusalem to the king.
23 Now Joab was in command of all the army of Israel; and Benaiah the son of Jehoiada was in command of the Cherethites and the Pelethites;24 and Adoram was in charge of the forced labor; and Jehoshaphat the son of Ahilud was the recorder; 25 and Sheva was secretary; and Zadok and Abiathar were priests; 26 and Ira the Jairite was also David’s priest.
David Avenges the Gibeonites
21:1 Now there was a famine in the days of David for three years, year after year. And David sought the face of the Lord. And the Lord said, “There is bloodguilt on Saul and on his house, because he put the Gibeonites to death.” 2 So the king called the Gibeonites and spoke to them. Now the Gibeonites were not of the people of Israel but of the remnant of the Amorites. Although the people of Israel had sworn to spare them, Saul had sought to strike them down in his zeal for the people of Israel and Judah. 3 And David said to the Gibeonites, “What shall I do for you? And how shall I make atonement, that you may bless the heritage of the Lord?” 4 The Gibeonites said to him, “It is not a matter of silver or gold between us and Saul or his house; neither is it for us to put any man to death in Israel.” And he said, “What do you say that I shall do for you?” 5 They said to the king, “The man who consumed us and planned to destroy us, so that we should have no place in all the territory of Israel, 6 let seven of his sons be given to us, so that we may hang them before the Lord at Gibeah of Saul, the chosen of the Lord.” And the king said, “I will give them.”
7 But the king spared Mephibosheth, the son of Saul’s son Jonathan, because of the oath of the Lord that was between them, between David and Jonathan the son of Saul. 8 The king took the two sons of Rizpah the daughter of Aiah, whom she bore to Saul, Armoni and Mephibosheth; and the five sons of Merab  the daughter of Saul, whom she bore to Adriel the son of Barzillai the Meholathite; 9 and he gave them into the hands of the Gibeonites, and they hanged them on the mountain before the Lord, and the seven of them perished together. They were put to death in the first days of harvest, at the beginning of barley harvest.
10 Then Rizpah the daughter of Aiah took sackcloth and spread it for herself on the rock, from the beginning of harvest until rain fell upon them from the heavens. And she did not allow the birds of the air to come upon them by day, or the beasts of the field by night. 11 When David was told what Rizpah the daughter of Aiah, the concubine of Saul, had done, 12 David went and took the bones of Saul and the bones of his son Jonathan from the men of Jabesh-gilead, who had stolen them from the public square of Beth-shan, where the Philistines had hanged them, on the day the Philistines killed Saul on Gilboa. 13 And he brought up from there the bones of Saul and the bones of his son Jonathan; and they gathered the bones of those who were hanged. 14 And they buried the bones of Saul and his son Jonathan in the land of Benjamin in Zela, in the tomb of Kish his father. And they did all that the king commanded. And after that God responded to the plea for the land.
War with the Philistines
15 There was war again between the Philistines and Israel, and David went down together with his servants, and they fought against the Philistines. And David grew weary. 16 And Ishbi-benob, one of the descendants of the giants, whose spear weighed three hundred shekels  of bronze, and who was armed with a new sword, thought to kill David. 17 But Abishai the son of Zeruiah came to his aid and attacked the Philistine and killed him. Then David’s men swore to him, “You shall no longer go out with us to battle, lest you quench the lamp of Israel.”
18 After this there was again war with the Philistines at Gob. Then Sibbecai the Hushathite struck down Saph, who was one of the descendants of the giants. 19 And there was again war with the Philistines at Gob, and Elhanan the son of Jaare-oregim, the Bethlehemite, struck down Goliath the Gittite, the shaft of whose spear was like a weaver’s beam.  20 And there was again war at Gath, where there was a man of great stature, who had six fingers on each hand, and six toes on each foot, twenty-four in number, and he also was descended from the giants. 21 And when he taunted Israel, Jonathan the son of Shimei, David’s brother, struck him down. 22 These four were descended from the giants in Gath, and they fell by the hand of David and by the hand of his servants.