The remaining chapters of 2 Samuel form an appendix to the two Books of Samuel and the events recorded here do not follow in chronological order.
2 Sam 21:1-14 The author records how David had earlier allowed seven of Saul’s descendents to be killed by the people of Gibeon as retribution for Saul’s attempt to annihilate the Gibeonites (an event not recorded in the Bible).
2 Sam 21:15-22 This account gives a summary of previous battles against the Philistines at Gob and Gath, including the defeat of Lahmi, the brother of Goliath (see 1 Chronicles 20:5).
Archaeological remains at Tel Zafit - the site of Gath (Ori)
2 Sam 22:1-51 This chapter records one of David’s songs of praise to God in thankfulness for his victories.
2 Sam 23:1-12 Some of David’s last words are reported here.
2 Sam 23:13-39 The deeds of David’s mightiest soldiers are recalled. These include the exploits of David's three mighty men (‘the famous three’) who went to Bethlehem to get water for David when he was hiding in the Cave of Adullam (see 1 Chronicles 11:10).
2 Sam 24:1-10 This chapter records the results of David’s census from Areor in Gad, north to Jazar, via Gilead and Kedesh to Dan, west to Sidon, south to Tyre, on to Beersheba and back to Jerusalem.
Land for the Temple
At the end of the Second Book of Samuel, the writer records the circumstances in which David bought a plot of land on Mount Moriah in c.982BC (which later became the site of the Temple in Jerusalem).
The Temple in Jerusalem was built on Mount Moriah
The Israelites were suffering from a plague. David bought the threshing floor of Araunah on Mount Moriah to the north of the City of David in Jerusalem and built an altar there. He sacrificed oxen on the altar as a burnt offering to save Jerusalem from the plague (see 2 Samuel 24:11-25).