HISTORY OF HOW DAVID OFFICIALLY BECAME KING OF ISRAEL
The first time, he was anointed by the prophet Samuel, secretly, and at God's direction (1 Samuel 16:1 - 13). That divine designation and election was prior and most important, but David was also anointed king by a decision of the people. First it was Judah where David served as a kind of mini-king for seven and a half years (2 Samuel 2:1-4). It was only one tribe, but it was a beginning.
Those first years as king were troubled times. The eleven other tribes followed after the death of Saul's surviving son, Ishbaal, who carried on a kind of civil war with David.
But during those troubled times, the house of David grew stronger and stronger, and the house of Saul grew constantly weaker. Finally, Saul's son Ishbosheth was assassinated by two of his own officers. These daring men thought they would be rewarded for their treachery by David, who instead ordered their execution (2 Samuel 4:1-12).
All the tribes of North Israel had no other option but to turn to David. So they all took the humbling trip to Hebron and began negotiations.
They first acknowledged that David was kinfolk: "We are your bone and flesh" (2 Samuel 5:1). Secondly, they recognized his considerable achievements. "Even when Saul was our king," they observed, "you were the one who led Israel in battle." Third, they recognized in him Yahweh's own choice: "Yahweh said to you: it is you who shall be shepherd of my people Israel, you who shall be ruler over Israel" (2 Samuel 5:2).
The word shepherd in antiquity was a synonym for king. When we hail Yahweh as shepherd in the twenty-third psalm, that title has royal overtones. "Ruler" also is a technical term, meaning something like "king-designate." The one who designates David as king is Yahweh. All that is needed now is the acclamation of the people.
For the next stage of the ritual, David made a covenant with them (2 Samuel 5:3). Elsewhere we speak of the covenant that Yahweh made with David (2 Samuel 23:5).
We are not told what obligations this covenant involved, but it would have likely included judging the people with righteousness and the poor with justice (Psalm 72:2), or defending the cause of the poor and giving deliverance to the needy (Psalm 72:4). David also would be responsible for their economic well-being (Psalm 72:16). All this was done with Yahweh as a witness.
Now it was the people's turn to act in this ritual, and they are represented by the traditional elders of the community. They anointed David king over Israel (2 Samuel 5:3).