Second Samuel takes up the narrative of accurate Bible history following the death of Saul, Israel’s first king, and carries it along to near the end of David’s 40-year reign. Thus, the period covered is from 1077 B.C.E. to about 1040 B.C.E. The fact that the book does not record David’s death is strong evidence that it was written about 1040 B.C.E., or just prior to his death.
At God’s direction, David and his men move their households to Hebron in the territory of Judah. Here the elders of the tribe come to anoint David as their king in 1077 B.C.E. following the death of Saul.
After the death of Saul and his other sons on the battlefield at Gilboa, Abner, a relative of Saul and the chief of his forces, took Ishbosheth, as a rival for the kingship over the nation, across the Jordan to Mahanaim, where he was installed as king over all the tribes except Judah, which recognized David as king. At the time Ishbosheth was 40 years old, and he is said to have reigned for two years. (2 Samuel 1:10 Ishbosheth, Saul’s son, was 40 years old when he became king over Israel, and he reigned for two years. The house of Judah, however, supported David.)
Since the Bible does not say exactly where this two-year reign fits in with the seven-and-a-half-year period when David ruled as king at Hebron, there is no way of resolving differences of opinion held by scholars on the point. However, it does seem more reasonable to think that Ishbosheth was made king shortly after the death of his father (rather than five years later), in which case there would have been a lapse of about five years between his assassination and David’s being installed as king over all Israel.—2Sa 2:8-11; 4:7; 5:4, 5.
There are periodic clashes between the two opposing forces, and Abner kills a brother of Joab. Finally, Abner defects to David’s camp. To David he takes Saul’s daughter Michal, for whom David long ago paid the marriage price. However, in revenge for the slaying of his brother, Joab finds an occasion for killing Abner. Soon thereafter Ishbosheth himself is murdered as he is “taking his noonday siesta.”—4:5.
Though he has already ruled as king in Judah for seven years and six months, David now becomes undisputed ruler, and representatives of the tribes anoint him as king over all Israel. This is his third anointing (1070 B.C.E.). One of David’s first acts as ruler of the entire kingdom is to capture the stronghold of Zion in Jerusalem.