It began with hiding from Saul in a cave to stay alive. Did David know this would be the start of a long campaign to become king?
1 Samuel 22:1-2 So David left Gath and escaped to the cave of Adullam. Soon his brothers and all his other relatives joined him there. Then others began coming—men who were in trouble or in debt or who were just discontented—until David was the captain of about 400 men.
Saul can’t have been the greatest of kings, because David wasn’t short of good support. Men from Benjamin, Saul’s own tribe, and Judah came to David at the stronghold, and he made them officers over his troops. He also had some brave and experienced warriors from the tribe of Gad join him:
1 Chronicles 12:8, 14-15 They were expert with both shield and spear, as fierce as lions and as swift as deer on the mountains. … These warriors from Gad were army commanders. The weakest among them could take on a hundred regular troops, and the strongest could take on a thousand! These were the men who crossed the Jordan River during its seasonal flooding at the beginning of the year and drove out all the people living in the lowlands on both the east and west banks.
This rebel force became the protector of some of the people, starting by protecting the people of Keilah from the Philistines, but only after God convinced them they could do it.