Later, David attacked the Philistines and defeated them. He took the town of Gath and the other small towns around it from the Philistines.