(Imām Bukhārī narrates): Abu Nu'aim narrated the hadith to us, he said: Ibn Uyainah narrated the hadith to us, from az-Zuhri, from Hazrat Anas (Allāh be pleased with him), he narrated that
the Messenger of Allāh ﷺ fell from a horse, and his ﷺ left side was grazed by it, so we went to him to visit him; then the time of prayer came, so he ﷺ led the prayer sitting, so we also offered it sitting, and he ﷺ said: "The Imam is appointed so that he may be followed; so when he says Allahu Akbar, you say Allahu Akbar, and when he performs ruku, you perform ruku, and when he rises from ruku, you rise from ruku, and when he says 'Sami' Allahu liman hamidah', you say 'Rabbana wa lakal hamd.'"
حَدَّثَنَا أَبُو نُعَيْمٍ، قَالَ حَدَّثَنَا ابْنُ عُيَيْنَةَ، عَنِ الزُّهْرِيِّ، عَنْ أَنَسِ بْنِ مَالِكٍ رَضِيَ اللَّهُ عَنْهُ، قَالَ
سَقَطَ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ مِنْ فَرَسٍ فَخُدِشَ أَوْ فَجُحِشَ شِقُّهُ الأَيْمَنُ، فَدَخَلْنَا عَلَيْهِ نَعُودُهُ، فَحَضَرَت الصَّلاَةُ، فَصَلَّى قَاعِدًا، فَصَلَّيْنَا قُعُودًا، وَقَالَ إِنَّمَا جُعِلَ الإِمَامُ لِيُؤْتَمَّ بِهِ، فَإِذَا كَبَّرَ فَكَبِّرُوا، وَإِذَا رَكعَ فَارْكَعُوا، وَإِذَا رَفَعَ فَارْفَعُوا، وَإِذَا قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ، فَقُولُوا رَبَّنَا وَلَكَ الحَمْدُ
Reference: Sahih Al Bukhari 1114