The Quran states:
وَإِذَا كُنْتَ فِيهِمْ فَأَقَمْتَ لَهُمُ الصَّلَاةَ فَلْتَقُمْ طَائِفَةٌ مِنْهُمْ مَعَكَ
Translation: When you are among them and lead them in prayer, let a group of them stand with you.
Taifah means a group. The duty to pray remains, but its manner is adjusted to the exigency of danger.