Sahl bin Saad reported,

The Messenger of Allah ﷺ went to the tribe of Banu Amr bin Awf to make peace between them. The time for prayer arrived, and the muezzin came to Abu Bakr and asked, "Will you lead the people in prayer so I may call the iqamah?"Abu Bakr replied, "Yes."So Abu Bakr began leading the prayer. Then the Messenger of Allah ﷺ arrived while the people were praying, and he made his way through until he stood in the row. The people began clapping. Abu Bakr would not turn around during his prayer, but when the people clapped persistently, he turned and saw the Messenger of Allah ﷺ. The Messenger of Allah ﷺ gestured to him to remain in his place. Abu Bakr رضي الله عنه raised his hands and praised Allah for what the Messenger of Allah ﷺ had commanded him. Then Abu Bakr stepped back until he was even with the row, and the Messenger of Allah ﷺ stepped forward and led the prayer.When he finished, he said, "Abu Bakr, what prevented you from staying in place when I commanded you?"Abu Bakr replied, "It is not for the son of Abu Quhafa to lead the prayer in front of the Messenger of Allah ﷺ."The Messenger of Allah ﷺ then said, "Why did I see you clapping so much? If something happens during the prayer, let him say 'Subhan Allah,' for when he says it, attention will turn to him. Clapping is only for women."

Bukhari 684

Sahih

حدثنا عبد الله بن يوسف قال أخبرنا مالك عن أبي حازم بن دينار

عن سهل بن سعد الساعدي

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

البخاري 684صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhan
Chapter
One who enters to lead the people in prayer and the original imam arrives, whether he steps back or not his prayer is valid
Numbering
Darussalam 684
Bukhari 684