Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:6053Abū al-Ḥasan al-Muqriʾ > al-Ḥasan b. Muḥammad b. Isḥāq > Yūsuf b. Yaʿqūb > Muḥammad b. Abū Bakr > Yaḥyá b. Saʿīd > Masʿūd

[Machine] Narrated by the Prophet ﷺ, he prayed two rak'ahs with these people and two rak'ahs with those people during the prayer of fear. This was mentioned in a condensed form by Simak, and it has also been narrated by Salim and Nafi' from Ibn Umar, that each group completed their prayer. The ruling is that it is established in cases like this, and with Allah is the success.  

البيهقي:٦٠٥٣أَخْبَرَنَا أَبُو الْحَسَنِ الْمُقْرِئُ أنبأ الْحَسَنُ بْنُ مُحَمَّدِ بْنِ إِسْحَاقَ ثنا يُوسُفُ بْنُ يَعْقُوبَ ثنا مُحَمَّدُ بْنُ أَبِي بَكْرٍ ثنا يَحْيَى بْنُ سَعِيدٍ عَنْ مَسْعُودٍ عَنْ سِمَاكٍ الْحَنَفِيِّ عَنِ ابْنِ عُمَرَ

عَنِ النَّبِيِّ ﷺ أَنَّهُ صَلَّى بِهَؤُلَاءِ رَكْعَةً وَبِهَؤُلَاءِ رَكْعَةً فِي صَلَاةِ الْخَوْفِ كَذَا أَتَى بِهِ سِمَاكٌ مُخْتَصَرًا وَقَدْ رُوِّينَاهُ عَنْ سَالِمٍ وَنَافِعٍ عَنِ ابْنِ عُمَرَ أَنَّ كُلَّ وَاحِدَةٍ مِنَ الطَّائِفَتَيْنِ قَضَوْا رَكْعَتَهُمْ وَالْحُكْمُ لِلْإِثْبَاتِ فِي مِثْلِ هَذَا وَبِاللهِ التَّوْفِيقُ