2 Samuel 16:5-14 New Revised Standard Version (NRSV)
Shimei Curses David
5 When King David came to Bahurim, a man of the family of the house of Saul came out whose name was Shimei son of Gera; he came out cursing. 6 He threw stones at David and at all the servants of King David; now all the people and all the warriors were on his right and on his left. 7 Shimei shouted while he cursed, “Out! Out! Murderer! Scoundrel! 8 The Lord has avenged on all of you the blood of the house of Saul, in whose place you have reigned; and the Lord has given the kingdom into the hand of your son Absalom. See, disaster has overtaken you; for you are a man of blood.”
9 Then Abishai son of Zeruiah said to the king, “Why should this dead dog curse my lord the king? Let me go over and take off his head.” 10 But the king said, “What have I to do with you, you sons of Zeruiah? If he is cursing because the Lord has said to him, ‘Curse David,’ who then shall say, ‘Why have you done so?’” 11 David said to Abishai and to all his servants, “My own son seeks my life; how much more now may this Benjaminite! Let him alone, and let him curse; for the Lord has bidden him. 12 It may be that the Lord will look on my distress,[a] and the Lord will repay me with good for this cursing of me today.” 13 So David and his men went on the road, while Shimei went along on the hillside opposite him and cursed as he went, throwing stones and flinging dust at him. 14 The king and all the people who were with him arrived weary at the Jordan;[b] and there he refreshed himself.
2 Samuel 19:16-23 New Revised Standard Version (NRSV)
16 Shimei son of Gera, the Benjaminite, from Bahurim, hurried to come down with the people of Judah to meet King David; 17 with him were a thousand people from Benjamin. And Ziba, the servant of the house of Saul, with his fifteen sons and his twenty servants, rushed down to the Jordan ahead of the king, 18 while the crossing was taking place,[a] to bring over the king’s household, and to do his pleasure.
David’s Mercy to Shimei
Shimei son of Gera fell down before the king, as he was about to cross the Jordan, 19 and said to the king, “May my lord not hold me guilty or remember how your servant did wrong on the day my lord the king left Jerusalem; may the king not bear it in mind. 20 For your servant knows that I have sinned; therefore, see, I have come this day, the first of all the house of Joseph to come down to meet my lord the king.” 21 Abishai son of Zeruiah answered, “Shall not Shimei be put to death for this, because he cursed the Lord’s anointed?” 22 But David said, “What have I to do with you, you sons of Zeruiah, that you should today become an adversary to me? Shall anyone be put to death in Israel this day? For do I not know that I am this day king over Israel?” 23 The king said to Shimei, “You shall not die.” And the king gave him his oath.