2 Samuel 24:1
David Displeases the Lord by Taking a Census
24:1 The Lord’s anger again raged against Israel, and he incited David against them, saying, “Go count Israel and Judah.”
2 Samuel 24:10-17
24:10 David felt guilty after he had numbered the army. David said to the Lord, “I have sinned greatly by doing this! Now, O Lord, please remove the guilt of your servant, for I have acted very foolishly.”
24:11 When David got up the next morning, the Lord had already spoken to Gad the prophet, David’s seer:
24:12 “Go, tell David, ‘This is what the Lord says: I am offering you three forms of judgment. Pick one of them and I will carry it out against you.’”
24:13 Gad went to David and told him, “Shall seven years of famine come upon your land? Or shall you flee for three months from your enemy with him in hot pursuit? Or shall there be three days of plague in your land? Now decide what I should tell the one who sent me.”
24:14 David said to Gad, “I am very upset! I prefer that we be attacked by the Lord, for his mercy is great; I do not want to be attacked by men!”
24:15 So the Lord sent a plague through Israel from the morning until the completion of the appointed time. Seventy thousand men died from Dan to Beer Sheba.
24:16 When the angel extended his hand to destroy Jerusalem, the Lord relented from his judgment. He told the angel who was killing the people, “That’s enough! Stop now!” (Now the Lord’s angel was near the threshing floor of Araunah the Jebusite.)
24:17 When he saw the angel who was destroying the people, David said to the Lord, “Look, it is I who have sinned and done this evil thing! As for these sheep – what have they done? Attack me and my family.”