And David's heart smote him, after that had numbered the
people
For nine or ten months his conscience lay asleep, but now the thing was done, it is awakened, and accuses him for it, and he repents of it; now he began to see the pride and haughtiness of his heart; his vanity and confidence in the creature, which led him to it; aggravated by doing it without seeking to know the mind of God, and without giving him his due, the half shekel, according to the law, ( Exodus 30:12 Exodus 30:13 ) ; intent only upon increasing his own revenue, as some think, intending to impose a poll tax upon the people when he had numbered them; and attempting to number a people who were not to be numbered; and numbering those who were under the age of twenty, and therefore the plague began before it was finished, ( 1 Chronicles 27:23 1 Chronicles 27:24 ) ;
and David said unto the Lord, I have sinned greatly in that I have
done;
he saw and owned his sin to be exceeding sinful, attended with very aggravating circumstances:
and now I beseech thee, Lord, take away the iniquity of thy servant;
the guilt of it from his conscience, which lay heavy there, and suffer not the punishment it deserves to take place on him, but grant an application of pardon to him:
for I have done very foolishly;
all sin is folly, and some sins are exceeding foolish, and so this appeared to David; or, "though I have done very foolishly" F2, yet forgive my sin, see ( Psalms 38:5 ) .