2 Samuel 24:4

Notwithstanding the king’s word prevailed against Joab, and against the captains of the host. And Joab and the captains of the host went out from the presence of the king, to number the people of Israel.

The king's word overruled the opposition of Joab and the captains of the host, and they went out from the king's presence to number the people of Israel, so the numbering was set in motion and begun. The command was carried out despite their resistance, with Joab and the army commanders leaving the king to do the work. That effort to count the people was not in keeping with God's order.

David acted in a time of prosperity when he had lost humility and trust in God, becoming proud of Israel's increase in numbers, wealth and greatness. He took glory to himself for the change from the weakness of his kingdom when he took the throne to its strength under his rule. He yielded to the temptation of the devil to number Israel in order to compare former weakness with present prosperity.

The census was a great and foolish sin against God, displeasing to Him and contrary to His express command and order. It exalted Israel and led the people to rely on strength of numbers instead of the living God. The effort to count the people also exemplifies the selfishness by which people in every age have tried to claim God's gifts for themselves or restrict them to some group, in contrast to Christ offering eternal life freely to all who receive Him without distinction of nationality, tribe, rank, or class.

The work was not fully completed before David was convicted of his sin, saw his error, humbled himself and confessed that he had foolishly numbered the people. His repentance came too late to stop judgment, for the word had already gone forth to offer him his choice of punishments. In confidence in God he chose to fall into the hands of a merciful God rather than the cruel mercies of wicked men.

Swift destruction by pestilence followed in which seventy thousand were destroyed. As the angel stretched over Jerusalem to destroy it, God bade him stay his work of death. David in terror and compassion begged God to save the sheep and let His hand be against him and his father's house and not upon the people.

God then required atonement through an altar on the threshing-floor of Araunah, which with cattle and all needful for sacrifice was offered freely. David insisted on buying it for full price because he would not come before the Lord with an offering which cost him nothing, and his heart was in the work. His repentance was accepted when he offered burnt-offerings and peace-offerings, and God answered with fire from heaven to consume the sacrifice and commanded the angel to put his sword into his sheath and cease destruction.