1 Now Satan entered the scene and seduced David into taking a census of Israel. David gave orders to Joab and the army officers under him, "Canvass all the tribes of Israel, from Dan to Beersheba, and get a count of the population. I want to know the number." 3 Joab resisted: "May God multiply his people by hundreds! Don't they all belong to my master the king? But why on earth would you do a thing like this - why risk getting Israel into trouble with God?" 4 But David wouldn't take no for an answer, so Joab went off and did it - canvassed the country and then came back to Jerusalem and reported the results of the census: There were 1,100,000 fighting men; of that total, Judah accounted for 470,000. Joab, disgusted by the command - it, in fact, turned his stomach! - protested by leaving Levi and Benjamin out of the census-taking. 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: "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: "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 - seventy thousand Israelites died. 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!" 15 The angel of God had just reached the threshing floor of Araunah the Jebusite. David looked up and saw the angel hovering between earth and sky, sword drawn and about to strike Jerusalem. David and the elders bowed in prayer and covered themselves with rough burlap. 17 David prayed, "Please! I'm the one who sinned; I'm the one at fault. But these sheep, what did they do wrong? Punish me, not them, me and my family; don't take it out on them."