2 Samuel 19:14
And he bowed the heart of all the men of Judah, even as the heart of one man; so that they sent this word unto the king, Return thou, and all thy servants. And he bowed the heart of all the men of Judah, even as the heart of one man; so that they sent this word unto the king, Return thou, and all thy servants.
After Absalom's death God turned the hearts of the people to David as the heart of one man, giving them united purpose to bring him and his servants back to Jerusalem. That oneness of heart was the setting for David's return in mercy rather than in retaliation. On that return Shimei, who had cursed David in his humiliation, came among the first of the rebels to meet him. He confessed his rebellious conduct, moved by fear for his life now that the king was restored.
Those who had witnessed the abuse urged David not to spare Shimei's life, because he had cursed the Lord's anointed. David rebuked those advisers instead of yielding to their demand for execution. He spared Shimei and mercifully forgave him. In doing so when he could readily have gratified revenge by putting the offender to death, he showed he had no revengeful spirit.