The meaning of the Quran states:
When you are among them, and you lead them in prayer (i.e. the prayer of fear), a group of them are commanded to stand with you. [4:102]
Shaykh Mansoor al-Buhootee [d. 1051 AH], may Allah have mercy on him, said:
Allah commanded that congregation be performed in a state of fear, so it is more deserving to be performed if there is no fear. (1)
(1) See “Notes on ar-Rawdh”, 2/257.