1 Chronicles
Chapters 21:27-30
Amplified Bible
27Then the Lord commanded the [avenging] angel, and he put his sword back into its sheath.
28When David saw that the Lord had answered him at the threshing floor of Ornan the Jebusite, he sacrificed there.
29For the tabernacle of the Lord, which Moses made in the wilderness, and the altar of burnt offering were at that time in the high place at Gibeon.
30But David could not go before it to inquire of God, for he was afraid of the sword of the angel of the Lord.