Fiqh-us-Sunnah Volume 2, Supererogatory Prayer, Fiqh 2.108.

Section : How to pray maghrib during times of fear.

The sunset prayer is not to be shortened and there is no hadith which states how it is to be prayed during times of fear. Therefore, the scholars differ over how it is to be performed. The Hanafi and Maliki schools say that the imam is to pray two rak’at with the first group and then one rak’ah with the second group. Ash-Shaf’i and Ahmad say it is permissible for the imam to pray one rak’ah with the first group and then two rak’at with the second group as it has been related that ‘Ali performed it in that manner.