Once Allah's Messenger (ﷺ) prayed two rak`at (instead of four) and finished his prayer…

Sahih al-Bukhari Book 10 Hadith 109

Sahih al-Bukhari #714

Call to Prayers (Adhaan) 10:109

Narrated Abu Huraira:

Once Allah's Messenger (ﷺ) prayed two rak`at (instead of four) and finished his prayer. Dhul-Yadain asked him whether the prayer had been reduced or whether he had forgotten. Allah's Messenger (ﷺ) asked the people whether Dhul-Yadain was telling the truth. The people replied in the affirmative. Then Allah's Apostle stood up, offered the remaining two rak`at and then finished his prayer with Taslim and then said, "Allahu Akbar." He followed it with two prostrations like ordinary prostrations or a bit longer.

Chapter: Can the Imam depend on the people's saying if he is in doubt (about a certain matter)?

Grade: Sahih