Another interpretation (of Psalms 37:14): "The wicked have drawn the sword." This refers to Hanun ben Nahash. When his father died, David sent to console him. What did Hanun do? He took David's servants and made of them a paradeigmata (meaning: a mockery), as it is said, "And [Hanun] took David's servants [and shaved off half their beards, and cut off their garments in the middle, etc.]" (II Samuel 10:4). Immediately he sent to Aram-Naharaim and hired from them thirty-two thousand chariots, apart from the many troops that he had, "and they came and encamped before Medeba" (I Chronicles 19:7). The Holy One, blessed be He, said to him: Wicked one, with the sword you have begun; let the sword come into the heart of that same man, as it is said, "Their sword shall enter into their own heart" (Psalms 37:15). Immediately Joab and Abishai arose and killed all the troops, as it is written, "And Joab drew near, etc." (II Samuel 10:13).
Hanun ben Nahash Shames David's Envoys and Falls by His Own Sword
Midrash Tanchuma Buber, Lech Lecha 7:2
ד"א חרב פתחו רשעים, זה חנון בן נחש, כיון שמת אביו שלח דוד לנחמו, מה עשה חנון, נטל עבדי דוד ועשה אותם פרדיגמטא (פי' ליצנות) שנאמר ויקח [חנון] את עבדי דוד [ויגלח את חצי זקנם ויכרות את מדויהם בחצי וגו'] (ש"ב י ד). מיד שלח לארם נהרים והשכיר מהם שלשים ושנים אלף רכב, חוץ מכמה אוכלוסין שהיה לו, ויבואו ויחנו על מידבא, א"ל הקב"ה רשע בחרב פתחת, תבא חרב בלבו של אותו האיש, שנאמר חרבם תבא בלבם, מיד עמדו יואב ואבישי והרגו כל האוכלוסין, דכתיב ויגש יואב וגו' (שם שם יג).