Surah At-Tawbah, ayah 122

9:122

۞ وَمَا كَانَ ٱلۡمُؤۡمِنُونَ لِيَنفِرُواْ كَآفَّةٗۚ فَلَوۡلَا نَفَرَ مِن كُلِّ فِرۡقَةٖ مِّنۡهُمۡ طَآئِفَةٞ لِّيَتَفَقَّهُواْ فِي ٱلدِّينِ وَلِيُنذِرُواْ قَوۡمَهُمۡ إِذَا رَجَعُوٓاْ إِلَيۡهِمۡ لَعَلَّهُمۡ يَحۡذَرُونَ ١٢٢

Wamā kānal-mu'minūna liyanfirū kāffatan falawlā nafara min kulli firqatim minhum tā'ifatul liyatafaqqahū fid-dīni waliyundhirū qawmahum idhā raja'ū ilayhim la'allahum yahdharūn

And it is not for the believers to go forth [to battle] all at once. For there should separate from every division of them a group [remaining] to obtain understanding in the religion and warn [i.e., advise] their people when they return to them that they might be cautious.