One was that all such prostrations are performed before the salām; this is the position of al-Shāfi'ī.
The second was that prostrations for an omission are performed before the salām, on the basis of the hadith of Ibn Buhaynah, while those for an addition are performed after the salām, on the basis of the hadith of Dhū al-Yadayn and the hadith of Ibn Mas'ūd concerning the occasion when the Prophet prayed five units. This is the position of Mālik and Abū Thawr.
Abū Hanīfah, his companions, and a group of scholars held that all such prostrations are performed after the salām.
I say: Ahmad holds that when someone discards his doubt and proceeds on the basis of certainty, he prostrates before the salām, as established in the authentic hadith. Thus, according to the position in which Ahmad agrees with Mālik, prostrations for an omission or doubt come before the salām, while those for an addition come after it. It has also been related from Mālik that one prostrates after the salām, because an addition is possible in this case, but not an omission.
The case of an addition concerning which Ahmad gave differing rulings is that of someone who prays five units. An authentic report establishes that the prostrations are performed after the salām. In that instance, however, he had forgotten. In the two Sahīh collections, Ibn Mas'ūd said:
“The Messenger of Allah, may Allah bless him and grant him peace, led us in five units of prayer. When he turned away, the people began murmuring among themselves. He asked, ‘What is the matter with you?’ They said, ‘O Messenger of Allah, has the prayer been increased?’ He replied, ‘No.’ They said, ‘But you prayed five units.’ He then turned back, performed two prostrations, and gave the salām. Then he said, ‘I am only human; I forget just as you forget.’”
In another version, he said: “I am only a human being like you. I remember just as you remember, and I forget just as you forget. So if any of you forgets, let him prostrate