2 Samuel 24:19

And David, according to the saying of Gad, went up as the LORD commanded.

David acted in direct obedience to the Lord's command delivered through Gad by going up as directed. His going up was to make atonement for his sin in numbering Israel. His heart was fully engaged in the work, and his repentance was accepted. He went to Araunah's threshing floor to build an altar to the Lord and present sacrifices there.

He would not accept the place together with cattle and everything needed for sacrifice as a free gift, but purchased it for the full price, since he would not come before the Lord with an offering that cost him nothing. There he offered burnt-offerings and peace-offerings. God signified acceptance of the offering by sending fire from heaven to consume the sacrifice. With that acceptance the destruction was ended, the destroying angel being commanded to return his sword to its sheath.