1 Chronicles 21:17-18 (ASV)
17 And David said unto God, Is it not I that commanded the people to be numbered? even I it is that have sinned and done very wickedly; but these sheep, what have they done? let thy hand, I pray thee, O Jehovah my God, be against me, and against my father’s house; but not against thy people, that they should be plagued.
18 Then the angel of Jehovah commanded Gad to say to David, that David should go up, and rear an altar unto Jehovah in the threshing-floor of Ornan the Jebusite.
About 1 Chronicles 21: 1 Chronicles 21 sits in the later years of David’s reign. It follows his census of Israel, which was an act of pride. Satan stood up against Israel and provoked David to number the people in verse 1. Joab warned him this was dangerous, but the king insisted. The count showed trust in military strength rather than in God. This sin brought judgment on the whole nation. God sent Gad the prophet to offer David a choice of three punishments. The options were famine, defeat by enemies, or a pestilence from the Lord in verse 12. Read the study notes
2 verses · Compare in parallel · Read all of 1 Chronicles 21