(Imām Bukhārī narrates): 'Alī ibn 'Abdullāh narrated to us, he said: Sufyān narrated the hadith to us several times, he said that I heard Anas ibn Mālik, he narrates that:
the Messenger of Allāh ﷺ fell from a horse, so his right side was injured. We came to him to visit him, so the time of prayer came, and he led us in prayer sitting — and once Sufyān said: We prayed sitting. When he finished the prayer, he said: The imām is appointed so that he may be followed, so when he pronounces the takbīr, you pronounce the takbīr; and when he performs rukū', you perform rukū'; and when he raises his head from rukū', you raise your head from rukū'; and when he says "Sami'a Allāhu liman hamidah," you say "Rabbanā wa laka al-hamd"; and when he performs sajdah, you perform sajdah.
Sufyān said: Ma'mar has narrated similarly. I said: Yes! He remembered it in this way. Al-Zuhrī has said: "wa laka al-hamd" — I have remembered the right side. When we came out from al-Zuhrī, Ibn Juraij said: And I was with him — that his right shin was injured.
حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ، قَالَ حَدَّثَنَا سُفْيَانُ، غَيْرَ مَرَّةٍ عَنِ الزُّهْرِيِّ، قَالَ سَمِعْتُ أَنَسَ بْنَ مَالِكٍ، يَقُولُ سَقَطَ رَسُولُ اللَّهِ صلى الله عليه وسلم عَنْ فَرَسٍ ـ وَرُبَّمَا قَالَ سُفْيَانُ مِنْ فَرَسٍ ـ فَجُحِشَ شِقُّهُ الأَيْمَنُ، فَدَخَلْنَا عَلَيْهِ نَعُودُهُ، فَحَضَرَتِ الصَّلاَةُ، فَصَلَّى بِنَا قَاعِدًا وَقَعَدْنَا ـ وَقَالَ سُفْيَانُ مَرَّةً صَلَّيْنَا قُعُودًا ـ فَلَمَّا قَضَى الصَّلاَةَ قَالَ " إِنَّمَا جُعِلَ الإِمَامُ لِيُؤْتَمَّ بِهِ، فَإِذَا كَبَّرَ فَكَبِّرُوا وَإِذَا رَكَعَ فَارْكَعُوا، وَإِذَا رَفَعَ فَارْفَعُوا، وَإِذَا قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ. فَقُولُوا رَبَّنَا وَلَكَ الْحَمْدُ. وَإِذَا سَجَدَ فَاسْجُدُوا ". قَالَ سُفْيَانُ كَذَا جَاءَ بِهِ مَعْمَرٌ قُلْتُ نَعَمْ. قَالَ لَقَدْ حَفِظَ، كَذَا قَالَ الزُّهْرِيُّ وَلَكَ الْحَمْدُ. حَفِظْتُ مِنْ شِقِّهِ الأَيْمَنِ. فَلَمَّا خَرَجْنَا مِنْ عِنْدِ الزُّهْرِيِّ قَالَ ابْنُ جُرَيْجٍ ـ وَأَنَا عِنْدَهُ ـ فَجُحِشَ سَاقُهُ الأَيْمَنُ.
Reference: Sahih Al Bukhari 805