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."
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?"
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.
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."
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.'"
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?"
David told Gad, "They're all terrible! But I'd rather be punished by God whose mercy is great, than fall into human hands."
So God unleashed an epidemic in Israel - 70,000 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!"
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.
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."
The angel of God ordered Gad to tell David to go and build an altar to God on the threshing floor of Araunah the Jebusite.
David did what Gad told him in obedience to God's command.
Meanwhile Araunah had quit threshing the wheat and was watching the angel; his four sons took cover and hid.
David came up to Araunah. When Araunah saw David, he left the threshing floor and bowed deeply before David, honoring the king.
David said to Araunah, "Give me the site of the threshing floor so I can build an altar to God. Charge me the market price; we're going to put an end to this disaster."
"O master, my king," said Araunah, "just take it; do whatever you want with it! Look, here's an ox for the burnt offering and threshing paddles for the fuel and wheat for the meal offering - it's all yours!"
David replied to Araunah, "No. I'm buying it from you, and at the full market price. I'm not going to offer God sacrifices that are no sacrifice."
So David bought the place from Araunah for 600 shekels of gold.
He built an altar to God there and sacrificed Whole-Burnt-Offerings and Peace-Offerings. He called out to God and God answered by striking the altar of Whole-Burnt-Offering with lightning.
Then God told the angel to put his sword back into its scabbard.
And that's the story of what happened when David saw that God answered him on the threshing floor of Araunah the Jebusite at the time he offered the sacrifice.
At this time the Tabernacle that Moses had constructed in the desert, and with it the Altar of Burnt Offering, were set up at the worship center at Gibeon.
But David, terrified by the angel's sword, wouldn't go there to pray to God anymore.