It was narrated from Anas that the Messenger of Allah(ﷺ) 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, Rabbanri lakal-hamd (Our Lord, to You be the praise).