Sayyiduna Abu Musa (may Allah be pleased with him) says that whenever the Messenger of Allah (peace and blessings be upon him) feared a people, he (peace and blessings be upon him) would say: 'Allahumma inna naj'aluka fi nuhurihim wa na'udhu bika min shururihim' (O Allah, we place You before them and seek refuge in You from their evils).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18463