David gave orders to Joab and the other officers, "Go through Israel, from one end of the country to the other, and count the people. I want to know how many there are."
Joab answered, "May the LORD make the people of Israel a hundred times more numerous than they are now! Your Majesty, they are all your servants. Why do you want to do this and make the whole nation guilty?"
Three years of famine? Or three months of running away from the armies of your enemies? Or three days during which the LORD attacks you with his sword and sends an epidemic on your land, using his angel to bring death throughout Israel? What answer shall I give the LORD?"
David replied to Gad, "I am in a desperate situation! But I don't want to be punished by people. Let the LORD himself be the one to punish me, because he is merciful."
Then he sent an angel to destroy Jerusalem, but he changed his mind and said to the angel, "Stop! That's enough!" The angel was standing by the threshing place of Araunah, a Jebusite.
David saw the angel standing in midair, holding his sword in his hand, ready to destroy Jerusalem. Then David and the leaders of the people---all of whom were wearing sackcloth---bowed low, with their faces touching the ground.
David prayed, "O God, I am the one who did wrong. I am the one who ordered the census. What have these poor people done? LORD, my God, punish me and my family, and spare your people."
"Take it, Your Majesty," Araunah said, "and do whatever you wish. Here are these oxen to burn as an offering on the altar, and here are the threshing boards to use as fuel, and wheat to give as an offering. I give it all to you."
But the king answered, "No, I will pay you the full price. I will not give as an offering to the LORD something that belongs to you, something that costs me nothing."
He built an altar to the LORD there and offered burnt offerings and fellowship offerings. He prayed, and the LORD answered him by sending fire from heaven to burn the sacrifices on the altar.
The Tent of the LORD's presence which Moses had made in the wilderness, and the altar on which sacrifices were burned were still at the place of worship at Gibeon at this time;