And after the people had been numbered, David’s heart was troubled. And David said to the Lord, Great has been my sin in doing this; but now, O Lord, be pleased to take away the sin of your servant, for I have done very foolishly
2 Samuel 24:10
2Sa 24:1 Again the wrath of the Lord was burning against Israel, and moving David against them, he said, Go, take the number of Israel and Judah.
1Ch 21:1 Now Satan, designing evil against Israel, put into David’s mind the impulse to take the number of Israel.