The Philistine rulers kept coming to fight Israel, but whenever David fought them, he won. He was famous because he won more battles against the Philistines than any of Saul's other officers.
One night, David was in Saul's home, playing the harp for him. Saul was sitting there, holding a spear, when an evil spirit from the LORD took control of him. Saul tried to pin David to the wall with the spear, but David dodged, and it stuck in the wall. David ran out of the house and escaped.
David and his men went there and fiercely attacked the Philistines. They killed many of them, then led away their cattle, and rescued the people of Keilah.