2 Samuel 24:16-17
24:16 When the angel extended his hand to destroy Jerusalem, the Lord relented from his judgment. He told the angel who was killing the people, “That’s enough! Stop now!” (Now the Lord’s angel was near the threshing floor of Araunah the Jebusite.)
24:17 When he saw the angel who was destroying the people, David said to the Lord, “Look, it is I who have sinned and done this evil thing! As for these sheep – what have they done? Attack me and my family.”
2 Samuel 24:25
24:25 Then David built an altar for the Lord there and offered burnt sacrifices and peace offerings. And the Lord accepted prayers for the land, and the plague was removed from Israel.