1 Chr 19:1-19
David‘s good intention was misinterpreted and this led to war. Hanun the son Nahash, king of Ammon, received bad counsel from his advisers and decided to treat David’s messengers badly when they visited to give him David’s comfort for the death of his father. He literarily disgraced them by shaving off the one half of their beards, and cutting off their garments in the middle, to their buttocks, before sending them away. David comforted the men for the disgrace, and when the Ammonites discovered their folly, the knew their would be war, so they hired the Syrians for help.
When David heard this, he sent Joab and the host of his men to war. Joab organized the army, with his brother Abishai leading against the Ammonites, and he against the Syrians. Both armies fled before the Israelites as God gave Israel victory. Eventually the Syrians made peace with Israel, and feared to ever help the Ammonites again.
God is a God of vengeance, when you have been wronged, he will come to your rescue and cause your enemies to be defeated and ashamed before you.