David was a great military leader and won many battles. In the beginning he was king of Judah. The people of Judah and all of Israel saw his victories and how he respected King Saul as God’s anointed. They saw how he humbly mourned the death of Abner, the commander of Israel army.
Then they came together to tell him they wanted him to be king.
2 Samuel 5:1-5
1All the tribes of Israel came to David at Hebron and said, “We are your own flesh and blood. 2 In the past, while Saul was king over us, you were the one who led Israel on their military campaigns. And the Lord said to you, ‘You will shepherd my people Israel, and you will become their ruler.’”
3 When all the elders of Israel had come to King David at Hebron, the king made a covenant with them at Hebron before the Lord, and they anointed David king over Israel.
4 David was thirty years old when he became king, and he reigned forty years. 5 In Hebron he reigned over Judah seven years and six months, and in Jerusalem he reigned over all Israel and Judah thirty-three years.