David built an altar to Yahweh there and offered burnt offerings and peace offerings. Then Yahweh was moved by prayer for the land, and the plague on Israel was stopped.
In context
23Araunah gave it all to the king. And Araunah said to the king, “May Yahweh your God accept you.” 24But the king said to Araunah, “No, I insist on paying you a price for it. I will not offer to Yahweh my God burnt offerings that cost me nothing.” So David bought the threshing floor and the oxen for fifty shekels of silver. 25David built an altar to Yahweh there and offered burnt offerings and peace offerings. Then Yahweh was moved by prayer for the land, and the plague on Israel was stopped.