Abu Musa Ashari reported,

The Prophet ﷺ, whenever he feared a people, would say, "O Allah, we place You before them and seek refuge in You from their evil."

Azami 11143

Sahih

عن عبد الله بن قيس (وهو أبو موسى الأشعري)

أن النبي ﷺ كان إذا خاف قوما قال: اللهم إنا نجعلك في نحورهم، ونعوذ بك من شرورهم.

الأعظمي 11143صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications of jihad
Section
What to say when fearing a people
Numbering
Jami al-Kamil 11143 (2nd edition)
Azami 11143