After this David defeated the Philistines and subdued them, and he took Gath and its villages out of the hand of the Philistines.