10 But after he had taken the census, David's conscience began to bother him. And he said to the Lord, "I have sinned greatly by taking this census. Please forgive my guilt, Lord, for doing this foolish thing." 11 The next morning the word of the Lord came to the prophet Gad, who was David's seer. This was the message: 12 "Go and say to David, 'This is what the Lord says: I will give you three choices. Choose one of these punishments, and I will inflict it on you.'" 13 So Gad came to David and asked him, "Will you choose three years of famine throughout your land, three months of fleeing from your enemies, or three days of severe plague throughout your land? Think this over and decide what answer I should give the Lord who sent me." 14 "I'm in a desperate situation!" David replied to Gad. "But let us fall into the hands of the Lord, for his mercy is great. Do not let me fall into human hands."

Matthew Henry's Commentary on 2 Samuel 24:10-14

Commentary on 2 Samuel 24:10-15

(Read 2 Samuel 24:10-15)

It is well, when a man has sinned, if he has a heart within to smite him for it. If we confess our sins, we may pray in faith that God would forgive them, and take away, by pardoning mercy, that sin which we cast away by sincere repentance. What we make the matter of our pride, it is just in God to take from us, or make bitter to us, and make it our punishment. This must be such a punishment as the people have a large share in, for though it was David's sin that opened the sluice, the sins of the people all contributed to the flood. In this difficulty, David chose a judgment which came immediately from God, whose mercies he knew to be very great, rather than from men, who would have triumphed in the miseries of Israel, and have been thereby hardened in their idolatry. He chose the pestilence; he and his family would be as much exposed to it as the poorest Israelite; and he would continue for a shorter time under the Divine rebuke, however severe it was. The rapid destruction by the pestilence shows how easily God can bring down the proudest sinners, and how much we owe daily to the Divine patience.