Satan was against Israel, and he caused David to count the people of Israel.
So David said to Joab and the commanders of the troops, "Go and count all the Israelites from Beersheba to Dan. Then tell me so I will know how many there are."
But Joab said, "May the Lord give the nation a hundred times more people. My master the king, all the Israelites are your servants. Why do you want to do this, my master? You will make Israel guilty of sin."
But the king commanded Joab, so Joab left and went through all Israel. Then he returned to Jerusalem.
Joab gave the list of the people to David. There were one million one hundred thousand men in all of Israel who could use the sword, and there were four hundred seventy thousand men in Judah who could use the sword.
But Joab did not count the tribes of Levi and Benjamin, because he didn't like King David's order.
David had done something God had said was wrong, so God punished Israel.
Then David said to God, "I have sinned greatly by what I have done! Now, I beg you to forgive me, your servant, because I have been very foolish."
The Lord said to Gad, who was David's seer,
"Go and tell David, 'This is what the Lord says: I offer you three choices. Choose one of them and I will do it.'"
So Gad went to David and said to him, "This is what the Lord says: 'Choose for yourself
three years of hunger. Or choose three months of running from your enemies as they chase you with their swords. Or choose three days of punishment from the Lord, in which a terrible disease will spread through the country. The angel of the Lord will go through Israel destroying the people.' Now, David, decide which of these things I should tell the Lord who sent me."
David said to Gad, "I am in great trouble. Let the Lord punish me, because the Lord is very merciful. Don't let my punishment come from human beings."
So the Lord sent a terrible disease on Israel, and seventy thousand people died.
God sent an angel to destroy Jerusalem, but when the angel started to destroy it, the Lord saw it and felt very sorry about the terrible things that had happened. So he said to the angel who was destroying, "That is enough! Put down your arm!" The angel of the Lord was then standing at the threshing floor of Araunah the Jebusite.
David looked up and saw the angel of the Lord in the sky, holding his sword drawn and pointed at Jerusalem. Then David and the older leaders bowed facedown on the ground. They were wearing rough cloth to show their grief.
David said to God, "I am the one who sinned and did wrong. I gave the order for the people to be counted. These people only followed me like sheep. They did nothing wrong. Lord my God, please punish me and my family, but stop the terrible disease that is killing your people."
Then the angel of the Lord told Gad to tell David that he should build an altar to the Lord on the threshing floor of Araunah the Jebusite.
So David did what Gad told him to do, in the name of the Lord.
Araunah was separating the wheat from the straw. When he turned around, he saw the angel. Araunah's four sons who were with him hid.
David came to Araunah, and when Araunah saw him, he left the threshing floor and bowed facedown on the ground before David.
David said to him, "Sell me your threshing floor so I can build an altar to the Lord here. Then the terrible disease will stop. Sell it to me for the full price."
Araunah said to David, "Take this threshing floor. My master the king, do anything you want. Look, I will also give you oxen for the whole burnt offerings, the threshing boards for the wood, and wheat for the grain offering. I give everything to you."
But King David answered Araunah, "No, I will pay the full price for the land. I won't take anything that is yours and give it to the Lord. I won't offer a burnt offering that costs me nothing."
So David paid Araunah about fifteen pounds of gold for the place.
David built an altar to the Lord there and offered whole burnt offerings and fellowship offerings. David prayed to the Lord, and he answered him by sending down fire from heaven on the altar of burnt offering.
Then the Lord commanded the angel to put his sword back into its holder.
When David saw that the Lord had answered him on the threshing floor of Araunah, he offered sacrifices there.
The Holy Tent that Moses made while the Israelites were in the desert and the altar of burnt offerings were in Gibeon at the place of worship.
But David could not go to the Holy Tent to speak with God, because he was afraid of the angel of the Lord and his sword. David said, "The Temple of the Lord God and the altar for Israel's burnt offerings will be built here."