2 Samuel 24:14
וַיֹּאמֶר דָּוִד אֶל גָּד צַר לִי מְאֹד נִפְּלָה נָּא בְיַד ה’ כִּי רַבִּים רַחֲמָו וּבְיַד אָדָם אַל אֶפֹּלָה
David said to Gad, “I am greatly distressed; let us fall now into the hand of Hashem because His mercies are great, and let me not fall into the hand of man.”
When a Divine punishment was mandated, G-d gave David the choice of a famine, war or pestilence. David told the prophet Gad that he preferred to fall into G-d’s hand than man’s hand. Accordingly, G-d sent the pestilence. We understand how David’s response eliminated the option of war but how did it exclude the famine? Rashi explains that in a famine, rich people can manipulate things to their advantage. Only the effects of a pestilence would be completely up to G-d. (This verse is the first line of Tachanun.)