Once again the anger of the LORD burned against Israel, and he caused David to harm them by taking a census. “Go and count the people of Israel and Judah,” the LORD told him.
So the king said to Joab and the commanders of the army, “Take a census of all the tribes of Israel—from Dan in the north to Beersheba in the south—so I may know how many people there are.”
But Joab replied to the king, “May the LORD your God let you live to see a hundred times as many people as there are now! But why, my lord the king, do you want to do this?”
But the king insisted that they take the census, so Joab and the commanders of the army went out to count the people of Israel.
First they crossed the Jordan and camped at Aroer, south of the town in the valley, in the direction of Gad. Then they went on to Jazer,
then to Gilead in the land of Tahtim-hodshi and to Dan-jaan and around to Sidon.
Then they came to the fortress of Tyre, and all the towns of the Hivites and Canaanites. Finally, they went south to Judah as far as Beersheba.
Having gone through the entire land for nine months and twenty days, they returned to Jerusalem.
Joab reported the number of people to the king. There were 800,000 capable warriors in Israel who could handle a sword, and 500,000 in Judah.
But after he had taken the census, David’s conscience began to bother him. And he said to the LORD, “I have sinned greatly by taking this census. Please forgive my guilt, LORD, for doing this foolish thing.”
The next morning the word of the LORD came to the prophet Gad, who was David’s seer. This was the message:
“Go and say to David, ‘This is what the LORD says: I will give you three choices. Choose one of these punishments, and I will inflict it on you.’”
So Gad came to David and asked him, “Will you choose three years of famine throughout your land, three months of fleeing from your enemies, or three days of severe plague throughout your land? Think this over and decide what answer I should give the LORD who sent me.”
“I’m in a desperate situation!” David replied to Gad. “But let us fall into the hands of the LORD, for his mercy is great. Do not let me fall into human hands.”