God sent an angel to Jerusalem to destroy it: and as he was about to destroy, Yahweh saw, and he repented him of the evil, and said to the destroying angel, It is enough; now stay your hand. The angel of Yahweh was standing by the threshing floor of Ornan the Jebusite.
And God was displeased with this thing; therefore he smote Israel. And David said unto God, I have sinned greatly, because I have done this thing: but now, I beseech thee, do away the iniquity of thy servant; for I have done very foolishly ( 1 Chronicles 21:7-8 ).