16 But when the angel reached out over Jerusalem to destroy it, God felt the pain of the terror and told the angel who was spreading death among the people, "Enough's enough! Pull back!" The angel of God had just reached the threshing floor of Araunah the Jebusite. David looked up and saw the angel hovering between earth and sky, sword drawn and about to strike Jerusalem. David and the elders bowed in prayer and covered themselves with rough burlap. 17 When David saw the angel about to destroy the people, he prayed, "Please! I'm the one who sinned; I, the shepherd, did the wrong. But these sheep, what did they do wrong? Punish me and my family, not them."

18 That same day Gad came to David and said, "Go and build an altar on the threshing floor of Araunah the Jebusite." 19 David did what Gad told him, what God commanded. 20 Araunah looked up and saw David and his men coming his way; he met them, bowing deeply, honoring the king 21 and saying, "Why has my master the king come to see me?" "To buy your threshing floor," said David, "so I can build an altar to God here and put an end to this disaster." 22 "Oh," said Araunah, "let my master the king take and sacrifice whatever he wants. Look, here's an ox for the burnt offering and threshing paddles and ox-yokes for fuel 23 - Araunah gives it all to the king! And may God, your God, act in your favor." 24 But the king said to Araunah, "No. I've got to buy it from you for a good price; I'm not going to offer God, my God, sacrifices that are no sacrifice." 25 He built an altar to God there and sacrificed burnt offerings and peace offerings. God was moved by the prayers and that was the end of the disaster.

Matthew Henry's Commentary on 2 Samuel 24:16-25

Commentary on 2 Samuel 24:16-17

(Read 2 Samuel 24:16-17)

Perhaps there was more wickedness, especially more pride, and that was the sin now chastised, in Jerusalem than elsewhere, therefore the hand of the destroyer is stretched out upon that city; but the Lord repented him of the evil, changed not his mind, but his way. In the very place where Abraham was stayed from slaying his son, this angel, by a like countermand, was stayed from destroying Jerusalem. It is for the sake of the great Sacrifice, that our forfeited lives are preserved from the destroying angel. And in David is the spirit of a true shepherd of the people, offering himself as a sacrifice to God, for the salvation of his subjects.

Commentary on 2 Samuel 24:18-25

(Read 2 Samuel 24:18-25)

God's encouraging us to offer to him spiritual sacrifices, is an evidence of his reconciling us to himself. David purchased the ground to build the altar. God hates robbery for burnt-offering. Those know not what religion is, who chiefly care to make it cheap and easy to themselves, and who are best pleased with that which costs them least pains or money. For what have we our substance, but to honour God with it; and how can it be better bestowed? See the building of the altar, and the offering proper sacrifices upon it. Burnt-offerings to the glory of God's justice; peace-offerings to the glory of his mercy. Christ is our Altar, our Sacrifice; in him alone we may expect to escape his wrath, and to find favour with God. Death is destroying all around, in so many forms, and so suddenly, that it is madness not to expect and prepare for the close of life.