2 Samuel 10:2

Then said David, I will shew kindness unto Hanun the son of Nahash, as his father shewed kindness unto me. And David sent to comfort him by the hand of his servants for his father. And David’s servants came into the land of the children of Ammon.

Nahash, king of the Ammonites, had died, and David sent his servants as ambassadors into the land of the children of Ammon to express sympathy and comfort to his son Hanun. David acted from grateful appreciation for favor shown to him in his distress when he was a fugitive from Saul. His overture was wholly unprovoked and generous in spirit.

Nahash's apparent kindness to David had been prompted wholly by hostility to Saul as king of Israel. The Ammonites hated the true God and were bitter enemies of Israel. David's generous intention could not be conceived by men controlled by Satan, who excites envy and suspicion to misconstrue the best intentions. Thus the mission was met with insult, and jealousy of David's increasing power turned the misunderstanding into a vast hostile coalition. The Ammonites were permitted to carry out the evil purposes of their hearts in order to reveal their real treacherous character, showing that it was not God's will for Israel to enter into league with them.