Abu Hurairah reported,

The Messenger of Allah ﷺ led one of the afternoon prayers, either Dhuhr, though I think it was most likely Asr, and gave the salam after only two rakahs. He then went to a palm trunk that he used to pray facing and sat down beside it, looking displeased.Sufyan said, He then went to a palm trunk in the direction of the qiblah and leaned his back against it.The hasty among the congregation rushed out, saying, "The prayer has been shortened."Among the congregation were Abu Bakr and Umar. The Messenger of Allah ﷺ said, "It has not been shortened, nor have I forgotten."Someone said, "But you only prayed two rakahs."The Messenger of Allah ﷺ looked at the people, and they said, "Yes."So he stood and prayed two more rakahs, then gave the salam. He then said the takbir and made a prostration like his usual prostration or longer, then raised his head and said the takbir, then prostrated again and said the takbir.

Ahmad 7376

Sahih

حدثنا سفيان سمع أيوب عن محمد ابن سيرين يقول سمعت

أبا هريرة يقول

صلى ﷺ إحدى صلاتي العشي إما الظهر وأكثر ظني أنها العصر فسلم في اثنتين ثم أتى جذعا كان يصلي إليه فجلس إليه مغضبا وقال سفيان ثم أتى جذعا في القبلة كان يسند إليه ظهره فأسند إليه ظهره قال ثم خرج سرعان الناس فقالوا قصرت الصلاة وفي القوم أبو بكر وعمر قال ما قصرت وما نسيت قال فإنك لم تصل إلا ركعتين قال فنظر رسول الله ﷺ فقالوا نعم فقام فصلى ركعتين ثم سلم ثم كبر وسجد كسجدته أو أطول ثم رفع وكبر ثم سجد وكبر

أحمد 7376صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 7376
Ahmad 7376