Upon realizing the severe nature of his actions, David turns directly to God with a heartfelt confession, pleading for atonement. He admits the gravity of his mistake, specifically acknowledging that his great sin was counting the people without collecting the required ransom from them [מצודת דוד]. He begs God for forgiveness [ביאור שטיינזלץ], fully recognizing that his wrongdoing was immense and complete [רש״י].
This confession is not merely a request for personal pardon, but a practical and urgent appeal to stop the ongoing plague. David reasons that the people themselves committed no wrong and should not face death because of his personal failure. He appeals to God, asking Him to remove the plague and save the nation, noting that if the people are spared, his own heavy burden of guilt will also be lifted [מצודת דוד].
Concluding his prayer with deep humility, David confesses that he acted out of profound foolishness [מצודת ציון, ביאור שטיינזלץ]. He takes full responsibility for his severe lack of judgment in numbering the Israelites without securing the necessary ransom [מצודת דוד].