1 Chronicles 21:5-15

5 and reported the results of the census: There were 1,100,000 fighting men; of that total, Judah accounted for 470,000.
6 Joab, disgusted by the command - it, in fact, turned his stomach! - protested by leaving Levi and Benjamin out of the census-taking.
7 And God, offended by the whole thing, punished Israel.
8 Then David prayed, "I have sinned badly in what I have just done, substituting statistics for trust; forgive my sin - I've been really stupid."
9 God answered by speaking to Gad, David's pastor:
10 "Go and give David this message: 'God's word: You have your choice of three punishments; choose one and I'll do the rest.'"
11 Gad delivered the message to David:
12 "Do you want three years of famine, three months of running from your enemies while they chase you down, or three days of the sword of God - an epidemic unleashed on the country by an angel of God? Think it over and make up your mind. What shall I tell the One who sent me?"
13 David told Gad, "They're all terrible! But I'd rather be punished by God whose mercy is great, than fall into human hands."
14 So God unleashed an epidemic in Israel - 70,000 Israelites died.
15 God then sent the angel to Jerusalem but when he saw the destruction about to begin, he compassionately changed his mind and ordered the death angel, "Enough's enough! Pull back!"
Published by permission. Originally published by NavPress in English as THE MESSAGE: The Bible in Contemporary Language copyright 2002 by Eugene Peterson. All rights reserved.