The Prophet ﷺ prayed three rakahs and then gave the salam. When this was pointed out to him, he stood up and prayed one more rakah, then gave the salam, and afterwards performed two prostrations while seated.
حدثنا معتمر عن خالد عن أبي قلابة عن أبي المهلب
أن النبي ﷺ صلى ثلاث ركعات فسلم فقيل له فقام فصلى ركعة فسلم ثم سجد سجدتين وهو جالس