2 Samuel 24: 2, 9 - 17
2 So the king said to Jo'ab and the commanders of the army, who were with him, "Go through all the tribes of Israel, from Dan to Beer-sheba, and number the people, that I may know the number of the people."
9 And Jo'ab gave the sum of the numbering of the people to the king: in Israel there were eight hundred thousand valiant men who drew the sword, and the men of Judah were five hundred thousand.
10 But David's heart smote 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, I pray thee, take away the iniquity of thy servant; for I have done very foolishly."
11 And 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."
13 So Gad came to David and told him, and said to him, "Shall three years of famine come to you in your land? Or will you flee three months before your foes while they pursue you? Or shall there be three days' pestilence in your land? Now consider, and decide what answer I shall return to him who sent me."
14 Then David said to Gad, "I am in great distress; let us fall into the hand of the LORD, for his mercy is great; but let me not fall into the hand of man."
15 So the LORD sent a pestilence upon Israel from the morning until the appointed time; and there died of the people from Dan to Beer-sheba seventy thousand men.
16 And when the angel stretched forth his hand toward Jerusalem to destroy it, the LORD repented of the evil, and said to the angel who was working destruction among the people, "It is enough; now stay your hand." And the angel of the LORD was by the threshing floor of Arau'nah the Jeb'usite.
17 Then David spoke to the LORD when he saw the angel who was smiting the people, and said, "Lo, I have sinned, and I have done wickedly; but these sheep, what have they done? Let thy hand, I pray thee, be against me and against my father's house."

EWTN