2 Samuel 24:18-25 New King James Version (NKJV)
The Altar on the Threshing Floor
18 And Gad came that day to David and said to him, “Go up, erect an altar to the Lord on the threshing floor of Araunah the Jebusite.” 19 So David, according to the word of Gad, went up as the Lord commanded. 20 Now Araunah looked, and saw the king and his servants coming toward him. So Araunah went out and bowed before the king with his face to the ground.
21 Then Araunah said, “Why has my lord the king come to his servant?”
And David said, “To buy the threshing floor from you, to build an altar to the Lord, that the plague may be withdrawn from the people.”
22 Now Araunah said to David, “Let my lord the king take and offer up whatever seems good to him. Look, here are oxen for burnt sacrifice, and threshing implements and the yokes of the oxen for wood. 23 All these, O king, Araunah has given to the king.”
And Araunah said to the king, “May the Lord your God accept you.”
24 Then the king said to Araunah, “No, but I will surely buy it from you for a price; nor will I offer burnt offerings to the Lord my God with that which costs me nothing.” So David bought the threshing floor and the oxen for fifty shekels of silver. 25 And David built there an altar to the Lord, and offered burnt offerings and peace offerings. So the Lord heeded the prayers for the land, and the plague was withdrawn from Israel.