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. (ESV)