1 Samuel 23:6

And it came to pass, when Abiathar the son of Ahimelech fled to David to Keilah, that he came down with an ephod in his hand.

The flight took place immediately after Saul's slaughter of the priests, when Abiathar the son of Ahimelech alone escaped and came to David at Keilah. On his arrival he told David what Saul had done to the priests. David acknowledged that his own coming to Ahimelech had brought danger upon his father's house, took the guilt upon himself, and promised Abiathar that he would be safe in remaining with him.