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:6005Abū Bakr Muḥammad b. al-Ḥasan b. Fūrak > ʿAbdullāh b. Jaʿfar > Yūnus b. Ḥabīb > Abū Dāwud > Ibn Abū Dhiʾb > Saʿīd b. Abū Saʿīd al-Maqburī > ʿAbd al-Raḥman b. Abū Saʿīd from his father

[Machine] We were with the Messenger of Allah ﷺ on the day of the trench, and we were occupied from performing prayers. So the Messenger of Allah ﷺ ordered Bilal to establish each prayer, and that was before the verse {So if you fear, then prayer on foot or riding} [Al-Baqarah 2:239] was revealed to him.  

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

كُنَّا مَعَ رَسُولِ اللهِ ﷺ يَوْمَ الْخَنْدَقِ فَشُغِلْنَا عَنْ صَلَوَاتٍ فَأَمَرَ رَسُولُ اللهِ ﷺ بِلَالًا فَأَقَامَ لِكُلِّ صَلَاةٍ إِقَامَةً وَذَلِكَ قَبْلَ أَنْ يَنْزِلَ عَلَيْهِ {فَإِنْ خِفْتُمْ فَرِجَالًا أَوْ رُكْبَانًا} [البقرة 239]