أَخْبَرَنِي يَحْيَى بْنُ حَبِيبِ بْنِ عَرَبِيٍّ الْبَصْرِيُّ، قَالَ حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ يَحْيَى، عَنْ عَبْدِ الرَّحْمَنِ الأَعْرَجِ، عَنِ ابْنِ بُحَيْنَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم صَلَّى فَقَامَ فِي الشَّفْعِ الَّذِي كَانَ يُرِيدُ أَنْ يَجْلِسَ فِيهِ فَمَضَى فِي صَلاَتِهِ حَتَّى إِذَا كَانَ فِي آخِرِ صَلاَتِهِ سَجَدَ سَجْدَتَيْنِ قَبْلَ أَنْ يُسَلِّمَ ثُمَّ سَلَّمَ ‏.‏

It was narrated from Ibn Buhainah that: The Prophet (PBUH) prayed, then he stood up after two rak'ahs while he was supposed to sit, and he continued his prayer. Then at the end of his prayer, he performed two prostrations before the Salam, then he said the Salam. Translation Not Available

Book Ref: Sunan An Nisai Book 12 Hadith 1177
Web Ref:  Sunan An Nisai Vol 2 Book 12 Hadith 1178