So the king spoke to Joab and the army commanders who were with him. He said, "Go all through the territories of the tribes of Israel. Go from Dan all the way to Beersheba. Count the fighting men. Then I'll know how many there are."
Joab replied to the king. He said, "King David, you are my master. May the Lord your God multiply the troops 100 times. And may you live to see it. But why would you want me to count the fighting men?"
In spite of what Joab said, the king's word had more authority than the word of Joab and the army commanders did. So they left the king and went out to count the fighting men of Israel.
They went across the Jordan River. They camped south of the town in the middle of the Arnon River valley near Aroer. Then they went through Gad and continued on to Jazer.
Then they went toward the fort of Tyre. They went to all of the towns of the Hivites and Canaanites. Finally, they went on to Beersheba. It was in the Negev Desert of Judah.
Joab reported to the king how many fighting men he had counted. In Israel there were 800,000 men who were able to handle a sword. In Judah there were 500,000.
David felt sorry that he had counted the fighting men. So he said to the Lord, "I committed a great sin when I counted Judah and Israel's men. Lord, I beg you to take away my guilt. I've done a very foolish thing."
So Gad went to David. He said to him, "Take your choice. Do you want three years when there won't be enough food in your land? Or do you want three months when you will run away from your enemies while they chase you? Or do you want three days when there will be a plague in your land? Think it over. Then take your pick. Tell me how to answer the One who sent me."
The angel reached his hand out to destroy Jerusalem. But the Lord was very sad because of the plague. So he spoke to the angel who was making the people suffer. He said, "That is enough! Do not kill any more people." The angel of the Lord was at Araunah's threshing floor. Araunah was from the city of Jebus.
David saw the angel who was striking the people down. David said to the Lord, "I'm the one who has sinned. I'm the one who has done what is wrong. These people are like sheep. What have they done? Let your powerful hand punish me and my family."
Araunah looked and saw the king and his officials coming toward him. So he went out to welcome them. He bowed down to the king with his face toward the ground.
Araunah said, "King David, you are my master. Why have you come to see me?" "To buy your threshing floor," David answered. "I want to build an altar there to honor the Lord. When I do, the plague on the people will be stopped."
Araunah said to David, "Take anything that pleases you. Offer it up. Here are oxen for the burnt offering. Here are threshing sleds. And here are wooden collars from the necks of the oxen. Use all of the wood to burn the offering.
But the king replied to Araunah, "No. I want to pay you for it. I won't sacrifice to the Lord my God burnt offerings that haven't cost me anything." So David bought the threshing floor and the oxen. He paid 20 ounces of silver for them.
David built an altar there to honor the Lord. He sacrificed burnt offerings and friendship offerings. Then the Lord answered prayer and blessed the land. The plague on Israel was stopped.