Abu Musa Al-Ash'ari (May Allah be pleased with him) reported:
When the Prophet (ﷺ) had any fear of an enemy, he used to supplicate: "Allahumma inna naj'aluka fi nuhurihim, wa na'udhu bika min shururihim (O Allah! We put You in front of them, and we seek refuge in You from their evils)."[Ahmad and Abu Dawud].
App reference: Book 12, Hadith 43
Arabic/English book reference: Book 12, Hadith 1327