A man entered the mosque while the Messenger of Allah ﷺ was sitting in one corner of it. He prayed, then came and greeted him.The Messenger of Allah ﷺ said to him, "And peace be upon you. Go back and pray, for you have not prayed."So he went back and prayed, then came and greeted him again.The Prophet said, "And peace be upon you. Go back and pray, for you have not prayed."On the second time, or the one after, the man said, "Teach me, Messenger of Allah."He said, "When you stand for prayer, perform the ablution thoroughly, then face the qiblah and say the takbir. Then recite whatever is easy for you from the Quran. Then bow until you are at ease in your bowing. Then rise until you are standing upright. Then prostrate until you are at ease in your prostration. Then rise until you are at ease sitting. Then prostrate until you are at ease in your prostration. Then rise until you are at ease sitting. Then do that throughout your entire prayer."Abu Usama said in the last part, "Until you are standing upright."
أن رجلا دخل المسجد، ورسول الله ﷺ جالس في ناحية المسجد، فصلى ثم جاء فسلم عليه، فقال له رسول الله ﷺ: وعليك السلام، ارجع فصل فإنك لم تصل فرجع فصلى ثم جاء فسلم، فقال: وعليك السلام، فارجع فصل فإنك لم تصل فقال في الثانية، أو في التي بعدها: علمني يا رسول الله، فقال: إذا قمت إلى الصلاة فأسبغ الوضوء، ثم استقبل القبلة فكبر، ثم اقرأ بما تيسر معك من القرآن، ثم اركع حتى تطمئن راكعا، ثم ارفع حتى تستوي قائما، ثم اسجد حتى تطمئن ساجدا، ثم ارفع حتى تطمئن جالسا، ثم اسجد حتى تطمئن ساجدا، ثم ارفع حتى تطمئن جالسا، ثم افعل ذلك في صلاتك كلها وقال أبو أسامة، في الأخير: حتى تستوي قائما.
Bukhari related it in the Book of Seeking Permission (6251), and Muslim in the Book of Prayer (397), both of them through Ubaydullah (that is, Ibn Umar), from Saeed bin Abu Saeed Maqburi, from Abu Hurairah, who narrated it. The wording given here is that of Bukhari.