So David said to Joab and the leaders of the people, "Go and count all the Israelites. Count everyone in the country— from the town of Beersheba all the way to the town of Dan. Then tell me, so I will know how many people there are."
But Joab answered, "May the Lord make his nation 100 times as large! Sir, all the Israelites are your servants. Why do you want to do this thing, my lord and king? You will make all the Israelites guilty of sin!"
But King David was stubborn. Joab had to do what the king said. So Joab left and went through all the country of Israel counting the people. Then he came back to Jerusalem
and told David how many people there were. In Israel there were 1,100,000 men who could use a sword. And there were 470,000 men in Judah who could use a sword.
Then David said to God, "I have done something very foolish. I have done a very bad sin by counting the Israelites. Now, I beg you to take the sin away from me, your servant."
Gad was David's seer. The Lord said to Gad, "Go and tell David: 'This is what the Lord says: I am going to give you three choices. You must choose one of them. Then I will punish you the way you choose.'"
Then Gad went to David. He said to David, "The Lord says, 'David, choose which punishment you want: three years without enough food, or three months of running away from your enemies while they use their swords to chase you, or three days of punishment from the Lord. Terrible sicknesses will spread through the country, and the Lord's angel will go through Israel destroying the people.' David, God sent me. Now, you must decide which answer I will give to him."
David said to Gad, "I am in trouble! I don't want some man to decide my punishment. The Lord is very merciful, so let the Lord decide how to punish me."
God sent an angel to destroy Jerusalem. But when the angel started to destroy Jerusalem, the Lord saw it and felt sorry. So the Lord decided not to destroy Jerusalem. The Lord said to the angel who was destroying, "Stop! That is enough!" The angel of the Lord was standing at the threshing floor of Araunah the Jebusite.
David looked up and saw the Lord's angel in the sky. The angel was holding his sword over the city of Jerusalem. Then David and the elders bowed with their faces touching the ground. They were wearing the special clothes to show their sadness.
David said to God, "I am the one who sinned. I gave the order for the people to be counted! I was wrong. The Israelites did not do anything wrong. Lord my God, punish me and my family, but stop the terrible sicknesses that are killing your people."
Then the angel of the Lord spoke to Gad. He said, "Tell David to build an altar to worship the Lord. David must build that altar near the threshing floor of Araunah the Jebusite."
David walked up the hill to Araunah. Araunah saw him and left the threshing floor. He walked to David and bowed with his face to the ground in front of him.
David said to Araunah, "Sell me your threshing floor. I will pay you the full price. Then I can use the area to build an altar to worship the Lord. Then the terrible sicknesses will be stopped."
Araunah said to David, "Take this threshing floor. You are my Lord and king. Do anything you want. Look, I will also give you cattle for the burnt offering. And you can have the wooden threshing tools to burn for the fire on the altar. And I will give the wheat for the grain offering. I will give all this to you."
But King David answered Araunah, "No, I will pay you the full price. I will not take anything that is yours and give it to the Lord. I will not give offerings that cost me nothing."
David built an altar for worshiping the Lord there. David offered burnt offerings and fellowship offerings. He prayed to the Lord. The Lord answered David by sending fire down from heaven. The fire came down on the altar of burnt offering.
(The Holy Tent and the altar of burnt offerings were at the high place in the town of Gibeon. Moses had made the Holy Tent while the Israelites were in the desert.