The LORD became angry with Israel again, so he provoked David to turn against Israel. He said, "Go, count Israel and Judah."
King David said to Joab, the commander of the army who was with him, "Go throughout the tribes of Israel from Dan to Beersheba and count the people. That way I will know how many there are."
Joab responded to the king, "May the LORD your God multiply the people a hundred times over, and may Your Majesty [live] to see it. But why does Your Majesty wish to do this?"
However, the king overruled Joab and the commanders of the army. So they left the king [in order] to count the people of Israel.
They crossed the Jordan River and camped at Aroer, south of the city in the middle of the valley. Then they went to Gad and to Jazer.
They went to Gilead and to Tahtim Hodshi and then to Dan Jaan and around toward Sidon.
They went to the fortified city of Tyre and all the cities of the Hivites and the Canaanites. Then they went to Beersheba in the Negev of Judah.
When they had covered the whole country, they came to Jerusalem after 9 months and 20 days.
Joab reported the census figures to the king: In Israel there were 800,000 able-bodied men who could serve in the army, and in Judah there were 500,000.
After David counted the people, his conscience troubled him. David said to the LORD, "I have committed a terrible sin by what I have done. LORD, please forgive me because I have acted very foolishly."
When David got up in the morning, the LORD spoke his word to the prophet Gad, David's seer.
"Go and tell David, 'This is what the LORD says: I'm offering you three choices. Choose the one you want me to do to you.'"
When Gad came to David, he told David this and asked, "Should seven years of famine come to you and your land, or three months during which you flee from your enemies as they pursue you, or should there be a three-day plague in your land? Think it over, and decide what answer I should give the one who sent me."
"I'm in a desperate situation," David told Gad. "Please let us fall into the LORD's hands because he is very merciful. But don't let me fall into human hands."
So the LORD sent a plague among the Israelites from that morning until the time he had chosen. Of the people from Dan to Beersheba, 70,000 died.
But when the Messenger stretched out his arm to destroy Jerusalem, the LORD changed his mind about the disaster. "Enough!" he said to the Messenger who was destroying the people. "Put down your weapon." The Messenger of the LORD was at the threshing floor of Araunah the Jebusite.
When David saw the Messenger who had been killing the people, he said to the LORD, "I've sinned. I've done wrong. What have these sheep done? Please let your punishment be against me and against my father's family."
That day Gad came to David and said to him, "Go, set up an altar for the LORD at Araunah the Jebusite's threshing floor."
David went as Gad had told him and as the LORD had commanded him.
When Araunah looked down and saw the king and his men coming toward him, he went out and bowed down with his face touching the ground in front of the king.
"Why has Your Majesty come to me?" Araunah asked. David answered, "To buy the threshing floor from you and to build an altar for the LORD. Then the plague on the people will stop."
Araunah said to David, "Take it, Your Majesty, and offer whatever you think is right. There are oxen for the burnt offering, and there are threshers and oxen yokes for firewood."
All this Araunah gave to the king and said, "May the LORD your God accept you."
"No!" the king said to Araunah. "I must buy it from you at a [fair] price. I won't offer the LORD my God burnt sacrifices that cost me nothing." So David bought the threshing floor and the oxen for 1¼ pounds of silver.
David built an altar for the LORD there and sacrificed burnt offerings and fellowship offerings. So the LORD heard the prayers for the country, and the plague on Israel stopped.