Mughira bin Shuba reported,

The Messenger of Allah ﷺ led us in either the noon or afternoon prayer. He stood up, and we said, "Glory be to Allah."He responded, "Glory be to Allah," and signaled with his hand, meaning, "Stand up." So we stood up.When he finished his prayer, he performed two prostrations, then said, "When one of you remembers before he has fully stood up, let him sit back down. But if he has fully stood up, let him not sit back down."

Ahmad 18222

Sahih

حدثنا أسود بن عامر حدثنا إسرائيل عن جابر عن المغيرة بن شبل عن قيس بن أبي حازم

عن المغيرة بن شعبة قال

أمنا رسول الله ﷺ في الظهر أو العصر فقام فقلنا سبحان الله فقال سبحان الله وأشار بيده يعني قوموا فقمنا فلما فرغ من صلاته سجد سجدتين ثم قال إذا ذكر أحدكم قبل أن يستتم قائما فليجلس وإذا استتم قائما فلا يجلس

أحمد 18222صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Mughira bin Shuba
Numbering
Darussalam 18222
Ahmad 18222