Before David got up the next morning, the word of the LORD had come to Gad1 the prophet, David's seer:2
References for 2 Samuel 24:11
"Go and tell David, 'This is what the LORD says: I am giving you three options. Choose one of them for me to carry out against you.' "
So Gad went to David and said to him, "Shall there come upon you three years of famine3 in your land? Or three months of fleeing from your enemies while they pursue you? Or three days of plague4 in your land? Now then, think it over and decide how I should answer the one who sent me."
References for 2 Samuel 24:13
David said to Gad, "I am in deep distress. Let us fall into the hands of the LORD, for his mercy5 is great; but do not let me fall into the hands of men."
References for 2 Samuel 24:14