The Messenger of Allah (
ﷺ) lagged behind (in a journey). He then narrated this story saying : Then we came to people. "Abd al-Rahman was leading them in the dawn
prayer. When he perceived the presence of the Prophet (
ﷺ), he intended to retire. The Prophet (
ﷺ) asked him to continue and I and the Prophet (
ﷺ)offered one rak'ah of prayer behind him. When he had pronounced the salutation, the Prophet (
ﷺ) got up and offered the rak'ah which had been finished before, and he made no addition to it.
Abu Dawud said: Abu Sa'id al-Khudri, Ibn al-Zubair and Ibn "Umar hold the opinion that whoever gets an odd number of the rak'ahs of prayer, he should perform two prostrations on account of forgetfulness.