2Sa 2 Samuel, chapter Second Book of Samuel, chapter 24
Afterwards, David felt really bad for ordering the census. He said to God, “I have committed a terrible sin by doing this. Please take away the guilt of your servant, for I have been very stupid.”
When David got up in the morning, the Lord had sent a message to the prophet Gad, David's seer, saying, “Go and tell David that this is what the Lord says: ‘I'm giving you three options. Choose one of them, and that's what I'll do to you.’”
So Gad went and told David, “You can choose three24:13. Septuagint reading. Hebrew reads “seven years,” as does 1 Chronicles 21:12. years of famine in your land, or three months of running from your enemies while they chase you, or three days of plague in your land. So think about it and decide how I should reply to the One who sent me.”