وَمِنَ النَّاسِ مَن يَقُولُ آمَنَّا بِاللَّهِ فَإِذَا أُوذِيَ فِي اللَّهِ جَعَلَ فِتْنَةَ النَّاسِ كَعَذَابِ اللَّهِ وَلَئِن جَاءَ نَصْرٌ مِّن رَّبِّكَ لَيَقُولُنَّ إِنَّا كُنَّا مَعَكُمْ ۚ أَوَلَيْسَ اللَّهُ بِأَعْلَمَ بِمَا فِي صُدُورِ الْعَالَمِينَ
“There are some who say, "We believe in Allah" — but when they suffer in the cause of Allah, they mistake this persecution at the hands of people for the punishment of Allah. But when victory comes from your Lord, they surely say, "We have always been with you." Does Allah not know best what is in the hearts of all beings?”
This ayah is part of Surah al-Ankabut's opening address on the trial of persecution -- exactly the ordeal of the early, weak believers described at this event.