What is the ruling if one forgets a pillar (rukn) of the prayer while still performing it and later remembers the unit it belonged to?

Chapter on the Two Prostrations of Forgetfulness

Al-Mughni

Book of Prayer

Book 3 · Issue 9 · Bab 7

Open in Qurani

Primary text

If one forgets a pillar while still in the prayer and remembers its location, they must proceed as if they had never omitted it. If one omits a prostration from the first rak'ah and remembers it during the Tashahhud, one rak'ah is completed, and that single prostration suffices. If one forgets the bowing in the second rak'ah and only remembers during the fourth, they should continue, complete the four rak'ahs without counting the one missed bowing, and then perform the prostration of forgetfulness for the error.