Then came David to Nob to Ahimelech the priest: and Ahimelech came to meet David trembling, and said to him, Why are you alone, and no man with you?
The mention of Doeg, an Edomite who had risen high in Saul’s government (1 Samuel 21:7), prepares the reader for his informing Saul about what happened at Nob (1 Samuel 22:9-19). Perhaps Doeg was "detained before the Lord" because he had come to the tabernacle to present an offering or to conduct some other business there.