Sahih al-Bukhari 732
Abul Yaman narrated to us, he said: Shu'aib told us. It is narrated from Zuhri that he said: Hazrat Anas (ra) bin Malik Ansari narrated to me that the Messenger of Allah (saw) rode a horse and his right side was grazed. Hazrat Anas (ra) used to say: Because of this he led us that day in one of the Prayers sitting, and we too prayed behind him sitting. Then, when he had said the Salam, he said: “The Imam is appointed only to be followed. So when he prays standing, you too pray standing; when he bows, you too bow; when he raises his head, you too raise yours; when he prostrates, you too prostrate; and when he says ‘Sami'allahu liman hamidah’ (Allah hears whoever praises Him), say: ‘Rabbana wa lakal hamd’ (Our Lord, and to You belongs all praise).”
AI-translated by Islam-Today