All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The congregational prayer is an obligation on all Muslim men if they hear the Athaan (i.e. call for prayer) according to the most correct opinion of the two opinions of scholars in this regard. As for firemen and rescue workers, if the Athaan was called during their work hours, there is no harm in performing the congregational prayer at their workplace if they fear that a problem may arise and they are called for duty while performing it in the mosque. Moreover, there is no harm in leaving the prayer abruptly or before finishing it (so as to do their job and save people's lives).