Saul and his men went to seek him. They told David: why he came down to the rock, and abode in the wilderness of Maon. When Saul heard [that], he pursued after David in the wilderness of Maon.
Some of David’s sympathizers ("they," 1 Samuel 23:25) informed him that Saul was approching with soldiers. David and his men then sought refuge behind a huge rock in the area. Just as Saul’s men were about to close in on David, news reached Saul that the Philistines had invaded an unspecified area of Israel. Saul had to break off his personal vendetta to respond to the Philistine danger (cf. 1 Samuel 23:1). David then moved on to Engedi, 14 miles east of Ziph, to increase his safety.