Bismillaah:

Abu Musa Al Ashari رضي اللّه عنه said:

When the Prophet صلي الله عليه وسلم had any fear of an enemy, he used to supplicate:

للَّهُمَّ اِنَّا نَجْعَلُكَ فِي نُحُورِهِمْ وَ نَعُوذُبِكَ مِنْ شُرُورِهِمْ

"Allahumma inna naj'aluka fi nuhoorihim, wa na'udhu bika min shuroorihim "

" O Allaah! We ask You to restrain them by their necks , and we seek refuge in You from their evil."

Takhreej:

{ Imam Ahmad in his Musnad and graded as Saheeh by Imam Ibn Hibban, Al Haakim, An Nawaawi, Adh Dahaabi, Al Albaani and Ibn Hajr said, its narrators are those of the Saheeh }

Imam An Nawaawi رحمه اللّه said:

It is desirable [ Mustahab ] to recite this dua [ if one fears an enemy ]

{ Kitaab Al Adhkaar }

*** And Allaah عزوجل knows best ***