What is the ruling on combining prostrations required due to forgetfulness occurring before and after the final salam?

Chapter on the Two Prostrations of Forgetfulness

Al-Mughni

Book of Prayer

Book 3 · Issue 2 · Bab 7

Open in Qurani

Primary text

When forgetfulness necessitates one prostration before the final salam and another after it (thus representing two distinct types or timings), the required prostration must be performed before the salam. This is because the prostration due before the salam is more primary and confirmed, as its cause (the error) necessitated it without any prior impediment. Therefore, it must be executed as if the other error did not exist. Upon performing the prostration before the salam, the subsequent prostration due after the salam is rendered unnecessary, as the first one suffices and stands in its place.