أَخْبَرَنَا هَنَّادُ بْنُ السَّرِيِّ، عَنِ ابْنِ عُيَيْنَةَ، عَنِ الزُّهْرِيِّ، عَنْ أَنَسٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم سَقَطَ مِنْ فَرَسٍ عَلَى شِقِّهِ الأَيْمَنِ فَدَخَلُوا عَلَيْهِ يَعُودُونَهُ فَحَضَرَتِ الصَّلاَةُ فَلَمَّا قَضَى الصَّلاَةَ قَالَ ‏"‏ إِنَّمَا جُعِلَ الإِمَامُ لِيُؤْتَمَّ بِهِ فَإِذَا رَكَعَ فَارْكَعُوا وَإِذَا رَفَعَ فَارْفَعُوا وَإِذَا سَجَدَ فَاسْجُدُوا وَإِذَا قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ فَقُولُوا رَبَّنَا لَكَ الْحَمْدُ ‏"‏ ‏.‏

It was narrated from Anas that the Messenger of Allah(PBUH) fell from a horse onto his right side.They came to visit him and the time for prayer came. When the prayer was over he said: "The Imam is appointed to be followed. When he bows, then bow, when he stands up, then stand up, when he prostrates, then prostrate, and when he says Sami' Alldhu liman hamidah (Allah hears the one who praises Him), then say, Rabbanrilakal-hamd (Our Lord, to You be the praise)." Translation Not Available

Book Ref: Sunan An Nisai Book 10 Hadith 794
Web Ref:  Sunan An Nisai Vol 1 Book 10 Hadith 795