When Saul returns from pursuing the Philistines, he is told that David is in the wilderness of Engedi. He takes three thousand chosen men and goes out to look for him. On the way there is a cave, and Saul goes in to relieve himself. David and his men were in the innermost part of that cave. His men tell him this is the day the Lord has given his enemy into his hand. David rises and quietly cuts off the edge of Saul's robe.
Afterward David's heart strikes him because he cut off the edge of the robe, and he tells his men that the Lord forbid he should do such a thing to his lord, the Lord's anointed. With these words he restrains his men and does not permit them to attack Saul. Saul leaves the cave and goes on his way.
David then goes out and calls to Saul: my lord the king. He bows with his face to the ground and asks why Saul listens to those who say David seeks his harm. He shows him the piece of the robe and tells him that the Lord gave him into his hand in the cave but that he would not stretch out his hand against him. He says the Lord judge between them and avenge him, but his hand will not be against him. He calls himself a dead dog and a flea, and leaves his cause in the hands of the Lord.
Saul asks whether this is the voice of David, his son, and lifts up his voice and weeps. He admits that David is more righteous than he, that he has repaid him good for evil, and that he knows David will be king and that the kingdom of Israel will be established in his hand. He asks him to swear that he will not cut off his offspring or wipe out his name from his father's house. David swears it. Saul goes home, and David and his men go up to the stronghold.