David built an altar to worship Yahweh there, and he offered sacrifices to be completely burned on the altar and sacrifices to restore fellowship with Yahweh. David prayed to Yahweh, and Yahweh answered by sending a fire from heaven to burn up the offerings on the altar.