God was displeased with this thing, so He struck Israel. David said to God, “I have sinned greatly, in that I have done this thing. But now, please take away the iniquity of Your servant, for I have done very foolishly.”
The LORD spoke to Gad, David’s seer, saying, “Go and speak to David, saying, ‘Thus says the LORD, “I offer you three things; choose for yourself one of them, which I will do to you.” ’ ” So Gad came to David and said to him, “Thus says the LORD, ‘Take for yourself either three years of famine, or three months to be swept away before your foes, while the sword of your enemies overtakes you, or else three days of the sword of the LORD, even pestilence in the land, and the angel of the LORD destroying throughout all the territory of Israel.’ Now, therefore, consider what answer I shall return to Him who sent me.” David said to Gad, “I am in great distress; please let me fall into the hand of the LORD, for His mercies are very great. But do not let me fall into the hand of man.”
So the LORD sent a pestilence on Israel; 70,000 men of Israel fell. And God sent an angel to Jerusalem to destroy it; but as he was about to destroy it, the LORD saw and was sorry over the calamity, and said to the destroying angel, “It is enough; now relax your hand.” And the angel of the LORD was standing by the threshing floor of Ornan the Jebusite.