We were in the company of the Messenger of Allah ﷺ when he said. Count for me those who profess al-Islam. We said: Messenger of Allah, do you entertain any fear concerning us and we are (at this time) between six hundred and seven hundred (in strength). He (the Holy Prophet) remarked: You don't perceive; you may be put to some trial, He (the narrator) said: We actually suffered trial so much so that some of our men were constrained to offer their prayers in concealment. (Using translation from Muslim 149)
قَالَ رَسُولُ اللهِ ﷺ أَحْصُوا لِي كَمْ يَلْفِظُ الْإِسْلَامَ؟ قُلْنَا يَا رَسُولَ اللهِ أَتَخَافُ عَلَيْنَا وَنَحْنُ مَا بَيْنَ السِّتِّ مِائَةِ إِلَى السَّبْعِ مِائَةِ؟ قَالَ فَقَالَ إِنَّكُمْ لَا تَدْرُونَ لَعَلَّكُمْ أَنْ تُبْتَلَوْا قَالَ فَابْتُلِينَا حَتَّى جَعَلَ الرَّجُلُ مِنَّا لَا يُصَلِّي إِلَّا سِرًّا