2 Samuel 19:16
And Shimei the son of Gera, a Benjamite, which was of Bahurim, hasted and came down with the men of Judah to meet king David. And Shimei the son of Gera, a Benjamite, which was of Bahurim, hasted and came down with the men of Judah to meet king David.
This meeting took place as David was returning to Jerusalem after Absalom's death. At that time God had turned the hearts of Israel to David as the heart of one man. The Shimei who hasted down was the same man who had cursed David during his flight in humility. He was among the first of the rebels to hurry with the men of Judah to meet David.
He came from fear for his life and confessed his rebellious conduct to David. Those who had witnessed his abuse urged David not to spare his life because he had cursed the Lord's anointed. David spared Shimei's life and mercifully forgave him rather than taking revenge. He rebuked those urging execution, refusing revenge when he could readily have put the offender to death.