2 Samuel 24:9-12
English Standard Version
10But David 's heart struck him after he had numbered the people. And David said to the Lord, "I have sinned greatly in what I have done. But now, O Lord, please take away the iniquity of your servant, for I have done very foolishly."
11And when David arose in the morning, the word of the Lord came to the prophet Gad, David 's seer, saying,
12"Go and say to David, ‘Thus says the Lord, Three things I offer you. Choose one of them, that I may do it to you.’"