The Messenger of Allah ﷺ rode a horse and was thrown from it, scraping his right side. He prayed one of the prayers while seated, and we prayed behind him while seated as well. When he finished, he said, "The imam is appointed only to be followed. So when he prays standing, pray standing. When he bows, bow. When he rises, rise. When he says, 'Allah hears whoever praises Him,' say, 'Our Lord, to You belongs all praise.' And when he prays sitting, all of you pray sitting."
أن رسول الله ﷺ ركب فرسا فصرع، فجحش شقه الأيمن فصلى صلاة من الصلوات وهو قاعد وصلينا وراءه قعودا فلما انصرف قال: إنما جعل الإمام ليؤتم به، فإذا صلى قائما فصلوا قياما، وإذا ركع فاركعوا، وإذا رفع فارفعوا، وإذا قال: سمع الله لمن حمده، فقولوا: ربنا ولك الحمد، وإذا صلى جالسا فصلوا جلوسا أجمعون.
Malik narrated it in the Book of Congregational Prayer (16), from Ibn Shihab, from Anas bin Malik, and he related it as mentioned. Bukhari narrated it in the Book of Adhan (689), from Abdullah bin Yusuf, from Malik. Muslim narrated it in the Book of Prayer (80/411), from Ibn Abu Umar, who said, Maen bin Isa narrated to us, from Malik, with the same wording. He also narrated it through Sufyan bin Uyayna, from Zuhri, and in it, "and when he prostrates, prostrate." Bukhari also narrated it through the route of Ibn Uyayna, but without mentioning "and when he prostrates, prostrate" (1114).