1. A satan rose up against Israel, and he enticed David into taking a census of Israel.
2. David therefore said to Joab and to the other generals of the army, "Go, find out the number of the Israelites from Beer-sheba to Dan, and report back to me that I may know their number."
3. But Joab replied: "May the LORD increase his people a hundredfold! My lord king, are not all of them my lord's subjects? Why does my lord seek to do this thing? Why will he bring guilt upon Israel?"
4. However, the king's command prevailed over Joab, who departed and traversed all of Israel, and then returned to Jerusalem.
5. Joab reported the result of the census to David: of men capable of wielding a sword, there were in all Israel one million one hundred thousand, and in Judah four hundred and seventy thousand.
6. Levi and Benjamin, however, he did not include in the census, for the king's command was repugnant to Joab.
7. This command displeased God, who began to punish Israel.
8. Then David said to God, "I have sinned greatly in doing this thing. Take away your servant's guilt, for I have acted very foolishly."
9. Then the LORD spoke to Gad, David's seer, in these words:
10. "Go, tell David: Thus says the LORD: I offer you three alternatives; choose one of them, and I will inflict it on you."
11. Accordingly, Gad went to David and said to him; "Thus says the LORD: Decide now--
12. will it be three years of famine; or three months of fleeing your enemies, with the sword of your foes ever at your back; or three days of the LORD'S own sword, a pestilence in the land, with the LORD'S destroying angel in every part of Israel? Therefore choose: What answer am I to give him who sent me?"
13. Then David said to Gad: "I am in dire straits. But I prefer to fall into the hand of the LORD, whose mercy is very great, than into the hands of men."
14. Therefore the LORD sent pestilence upon Israel, and seventy thousand men of Israel died.
15. God also sent an angel to destroy Jerusalem; but as he was on the point of destroying it, the LORD saw and decided against the calamity, and said to the destroying angel, "Enough now! Stay your hand!"The angel of the LORD was then standing by the threshing floor of Ornan the Jebusite.
16. When David raised his eyes, he saw the angel of the LORD standing between earth and heaven, with a naked sword in his hand stretched out against Jerusalem. David and the elders, clothed in sackcloth, prostrated themselves face to the ground,
17. and David prayed to God: "Was it not I who ordered the census of the people? I am the one who sinned, I did this wicked thing. But these sheep, what have they done? O LORD, my God, strike me and my father's family, but do not afflict your people with this plague!"
18. Then the angel of the LORD commanded Gad to tell David to go up and erect an altar to the LORD on the threshing floor of Ornan the Jebusite.
19. David went up at Gad's command, given in the name of the LORD.
20. While Ornan was threshing wheat, he turned around and saw the king, and his four sons who were with him, without recognizing them.
21. But as David came on toward him, he looked up and saw that it was David. Then he left the threshing floor and bowed down before David, his face to the ground.
22. David said to Ornan: "Sell me the ground of this threshing floor, that I may build on it an altar to the LORD. Sell it to me at its full price, that the plague may be stayed from the people."
23. But Ornan said to David: "Take it as your own, and let my lord the king do what seems best to him. See, I also give you the oxen for the holocausts, the threshing sledges for the wood, and the wheat for the cereal offering. I give it all to you."
24. But King David replied to Ornan: "No! I will buy it from you properly, at its full price. I will not take what is yours for the LORD, nor offer up holocausts that cost me nothing."
25. So David paid Ornan six hundred shekels of gold for the place.
26. David then built an altar there to the LORD, and offered up holocausts and peace offerings. When he called upon the LORD, he answered him by sending down fire from heaven upon the altar of holocausts.
27. Then the LORD gave orders to the angel to return his sword to its sheath.
28. Once David saw that the LORD had heard him on the threshing floor of Ornan the Jebusite, he continued to offer sacrifices there.
29. The Dwelling of the LORD, which Moses had built in the desert, and the altar of holocausts were at that time on the high place at Gibeon.
30. But David could not go there to worship God, for he was fearful of the sword of the angel of the LORD.