It is narrated from an elder of the Ansar that a man entered the mosque, and the Messenger of Allah (peace and blessings be upon him) heard the sound of his sandals. When he (peace and blessings be upon him) had said the salam of the prayer, he asked him: "In what state did you find us?" He said: "You were in prostration, so I also prostrated." He (peace and blessings be upon him) said: "Do it like that, and do not count the prostration alone (as a rak'ah) until you have caught the complete rak'ah (with the bowing). So when you see the imam standing, stand; when you see him bowing, bow; when you see him prostrating, prostrate; and when you see him sitting, sit."
This hadith is sahih (authentic).
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / صفة الصلاة / 479
Hadith Gradingمحدثین:إسناده صحيح
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :قال ابن حجر: صَحِيحٌ . » «أورده ابن حجر فى "المطالب العالية"، 479، وأخرجه عبد الرزاق فى «مصنفه» برقم: 3373»