2 Samuel 24:Intro David, tempted by Satan, numbereth the people -- David chooseth the three days' pestilence -- David by repentance
preventeth the destruction of Jerusalem.
1 Chronicles 21:Intro David, tempted by Satan, numbers the people -- David repenteth of it -- David chooseth the pestilence -- David by repentance
preventeth the destruction of Jerusalem -- David having built an altar, God giveth a sign of his favor by fire, and stayeth the plague -- David sacrificeth there.