2 Samuel 19:13 + 20:9-10 - And say to Amasa, 'Are you not my own flesh and blood? May God deal with me, be it ever so severely, if from now on you are not the commander of my army in place of Joab.' "
Joab said to Amasa, "How are you, my brother?" Then Joab took Amasa by the beard with his right hand to kiss him. Amasa was not on his guard against the dagger in Joab's hand, and Joab plunged it into his belly, and his intestines spilled out on the ground. Without being stabbed again, Amasa died. Then Joab and his brother Abishai pursued Sheba son of Bicri.
I wonder why David so suddenly replaced Joab with Amasa. Was it because Joab had killed Absalom? Had Joab done something else to displease David? Had Amasa shown himself to be a better leader than Joab?
In any case, I wonder if David realized how upset this would make Joab. Or did David expect Joab to react violently in order to get rid of Amasa?!