Allah encourages His Prophet against hypocrites,

لَقَدِ ابْتَغَوُاْ الْفِتْنَةَ مِن قَبْلُ وَقَلَّبُواْ لَكَ الأُمُورَ

(Verily, they had plotted sedition before, and had upset matters for you,) `For a long time,' Allah says, hypocrites thought and plotted against you and your Companions, as well as, failing and attempting to extinguish your religion.' This occurred soon after the Prophet migrated to Al-Madinah, when pagan Arabs joined force and the Jews and hypocrites of Al-Madinah waged war against the Messenger ﷺ. When Allah gave victory to the Prophet in Badr and raised high his word, `Abdullah bin Ubayy and his fellows said, "This (Islam) is a matter that has prevailed." They embraced Islam outwardly, and whenever Allah elevated Islam and its people in might, hypocrites increased in rage and disappointment,

حَتَّى جَآءَ الْحَقُّ وَظَهَرَ أَمْرُ اللَّهِ وَهُمْ كَـرِهُونَ

(until the truth (victory) came and the decree of Allah became manifest though they hated it.)