9:122
وَ مَا كَانَ ٱلْ مُؤْمِنُونَ لِ يَنفِرُ وا۟ كَآفَّةً فَ لَوْلَا نَفَرَ مِن كُلِّ فِرْقَةٍ مِّنْ هُمْ طَآئِفَةٌ لِّ يَتَفَقَّهُ وا۟ فِى ٱل دِّينِ وَ لِ يُنذِرُ وا۟ قَوْمَ هُمْ إِذَا رَجَعُ وٓا۟ إِلَيْ هِمْ لَعَلَّ هُمْ يَحْذَرُ ونَ
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 their people when they return to them that they might be cautious.