With the passing of Saul and Jonathan in battle, the kingship devolved upon David as Samuel had foretold. As a result of prayer he proceeded to Hebron, where he was anointed "king over the house of Judah" by the Judeans themselves, reigning there for "seven years and six months" (II Sam. 2:4,11).
David's rule, however, was by no means undisputed. Saul's supporters had crowned his son Ish-bosheth as king in the territory of Gilead to the east of the Jordan, with influence extending "over Ephraim, and over Benjamin, and over all Israel" (verse 9). Here, then, were the elements of civil war, but there could be no doubt concerning the eventual outcome of the strife between the two kings, for "David waxed stronger and stronger, and the house of Saul waxed weaker and weaker" (3:1) until, at the age of thirty-seven, David was accepted as monarch of a united kingdom of Judah and all Israel combined (see 5: 1-5).
It was apparently about this time that Jerusalem became the capital of the Hebrew nation. Taking its central fortress of Zion by storm, David renamed the town "the city of David" in honor of this event and established his court there (I Chron. 11:4-7). Since Jerusalem lay almost on the boundary between the tribal territory of Judah and that of Benjamin, the selection of this city for David's capital was a wise one, calculated to satisfy both the members of David's own tribe of Judah, and those who, like Saul, were Benjamites. David also transferred the sacred "ark of the covenant" to Jerusalem, thus identifying the city as a religious center (see II Sam. 6).