16 When David looked up and saw the angel of the Lord standing between earth and heaven, with his drawn sword in his hand stretched out over Jerusalem, David and the elders, covered in sackcloth, fell facedown. 17 David said to God, “Wasn’t I the one who gave the order to count the people? I am the one who has sinned and acted very wickedly. But these sheep, what have they done? Lord my God, please let your hand be against me and against my father’s family, but don’t let the plague be against your people.” ~ 1 Chronicles 21:16-17CSB
King David had brought the wrath of God on the nation of Israel because of his sin. Satan incited King David to number the people of Israel. This sinful action brought the punishment of the LORD.
Even though the LORD brought His wrath, when David repented and prayed to the LORD for mercy, God heard him. God will always have mercy on a repentive heart. Why? Because his desire is that none perish but all come to acceptance.
Peace. Love. Go Forth and Repent To The LORD.