2So David said to Joab and the commanders of the troops, "Go and count Israel from Beer-sheba to Dan and bring a report to me so I can know their number."
3Joab replied, "May the LORD multiply the number of his people a hundred times over! My lord the king, aren't they all my lord's servants? Why does my lord want to do this? Why should he bring guilt on Israel?"
5Joab gave the total troop registration to David. In all Israel there were one million one hundred thousand armed men and in Judah itself four hundred seventy thousand armed men.
12three years of famine, or three months of devastation by your foes with the sword of your enemy overtaking you, or three days of the sword of the LORD--a plague on the land, the angel of the LORD bringing destruction to the whole territory of Israel.' Now decide what answer I should take back to the one who sent me."
13David answered Gad, "I'm in anguish. Please, let me fall into the LORD's hands because his mercies are very great, but don't let me fall into human hands."
15Then God sent an angel to Jerusalem to destroy it, but when the angel was about to destroy the city, the LORD looked, relented concerning the destruction, and said to the angel who was destroying the people, "Enough, withdraw your hand now!" The angel of the LORD was then standing at the threshing floor of Ornan the Jebusite.
16When David looked up and saw the angel of the LORD standing between earth and heaven, with his drawn sword in his hand stretched out over Jerusalem, David and the elders, clothed in sackcloth, fell facedown.
17David said to God, "Wasn't I the one who gave the order to count the people? I am the one who has sinned and acted very wickedly. But these sheep, what have they done? LORD my God, please let your hand be against me and against my father's family, but don't let the plague be against your people."
22Then David said to Ornan, "Give me this threshing-floor plot so that I may build an altar to the LORD on it. Give it to me for the full price, so the plague on the people may be stopped."
23Ornan said to David, "Take it! My lord the king may do whatever he wants. See, I give the oxen for the burnt offerings, the threshing sledges for the wood, and the wheat for the grain offering--I give it all."
24King David answered Ornan, "No, I insist on paying the full price, for I will not take for the LORD what belongs to you or offer burnt offerings that cost me nothing."
26He built an altar to the LORD there and offered burnt offerings and fellowship offerings. He called on the LORD, and he answered him with fire from heaven on the altar of burnt offering.