The Messenger of Allah ﷺ fell from a horse onto his right side. People came in to visit him, and when the time for prayer arrived, he led them in prayer. When he finished, he said, "The imam is appointed only to be followed. When he bows, bow. When he rises, rise. When he prostrates, prostrate. And when he says, 'Allah hears the one who praises Him,' say, 'Our Lord, to You belongs all praise.'"
أخبرنا هناد بن السري عن ابن عيينة عن الزهري
أن رسول الله ﷺ سقط من فرس على شقه الأيمن فدخلوا عليه يعودونه فحضرت الصلاة فلما قضى الصلاة قال إنما جعل الإمام ليؤتم به فإذا ركع فاركعوا وإذا رفع فارفعوا وإذا سجد فاسجدوا وإذا قال سمع الله لمن حمده فقولوا ربنا لك الحمد
Bukhari transmitted it in the Book of Adhan, chapter "He says the takbir as he goes down into prostration," hadith no. 805, and Muslim in the Book of Prayer, chapter "The follower's following of the imam," hadith no. 411, from the hadith of Sufyan bin Uyayna with the same chain, and it is also in Kubra, hadith no. 869.