I Samuel 23:7 Midrash

וַיֻּגַּ֣ד לְשָׁא֔וּל כִּי־בָ֥א דָוִ֖ד קְעִילָ֑ה וַיֹּ֣אמֶר שָׁא֗וּל נִכַּ֨ר אֹת֤וֹ אֱלֹהִים֙ בְּיָדִ֔י כִּ֚י נִסְגַּ֣ר לָב֔וֹא בְּעִ֖יר דְּלָתַ֥יִם וּבְרִֽיחַ׃

And it was told Saul that David was come to Keilah. And Saul said: ‘God hath delivered him into my hand; for he is shut in, by entering into a town that hath gates and bars.’

Read midrashic interpretation of I Samuel 23:7: and classical rabbinic exegesis.