The Messenger of Allah ﷺ fell from a horse and scraped or injured his right side. We came to visit him, and when the time for prayer arrived, he prayed sitting down, so we prayed sitting as well.He said, "The imam is appointed only to be followed. When he says the takbir, say the takbir. When he bows, bow. When he rises, rise. When he says, 'Allah hears the one who praises Him,' say, 'Our Lord, to You belongs all praise.'"
سقط رسول الله ﷺ من فرس فخدش أو فجحش- شقه الأيمن. فدخلنا عليه نعوده، فحضرت الصلاة فصلى قاعدا فصلينا قعودا وقال: إنما جعل الإمام ليؤتم به، فإذا كبر فكبروا، وإذا ركع فاركعوا، وإذا رفع فارفعوا، وإذا قال سمع الله لمن حمده فقولوا: ربنا ولك الحمد.
Bukhari narrated it in Shortening the Prayer (1114), and Muslim in Prayer (411), both from the hadith of Sufyan bin Uyayna, from Zuhri, from Anas bin Malik, who related it, and their wording is identical. The hadith has already been mentioned in the various chapters on congregational prayer, where other hadiths on the subject are also found.