Hadith 20.2
Prayer
Al-Mughira b. Shu'ba reported God’s Messenger as saying, “When an <i>imam</i> stands up at the end of two <i>rak'as</i>, if he remembers before standing straight up he should sit down, but if he stands straight up he must not sit down, but perform the two prostrations of forgetfulness.” Abu Dawud and Ibn Majah transmitted it.
وَعَنِ الْمُغِيرَةِ بْنِ شُعْبَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا قَامَ الْإِمَامُ فِي الرَّكْعَتَيْنِ فَإِنْ ذَكَرَ قَبْلَ أَنْ يَسْتَوِي قَائِما فليجلس وَإِنِ اسْتَوَى قَائِمًا فَلَا يَجْلِسْ وَلْيَسْجُدْ سَجْدَتَيِ السَّهْو» . رَوَاهُ أَبُو دَاوُدَ وَابْنُ مَاجَهْ
Hadith gradings, numbering and translations can differ between editions. For legal rulings or detailed interpretation, consult qualified scholarship and the referenced edition.