Narrated Sahl ibn Sa’d (raa): There was a dispute amongst the people of the tribe of Bani ‘Amr bin ‘Auf. The Prophet (saws) went to them along with some of his companions in order to make peace between them.
The time for the prayer became due but the Prophet did not turn up; Bilal (raa) pronounced the Adhan (i.e. call) for the prayer but the Prophet did not turn up, so Bilal (raa) went to Abu Bakr (raa) and said, "The time for the prayer is due and the Prophet (saws) is detained, would you lead the people in the prayer?".
Abu Bakr (raa) replied, "Yes, you wish." So, Bilal (raa) pronounced the Iqama of the prayer and Abu Bakr (raa) went ahead (to lead the prayer), but the Prophet (saws) came walking among the rows till he joined the first row. The people started clapping and they clapped too much, and Abu Bakr (raa) used not to look hither and thither in the prayer. However, he turned round and saw the Prophet (saws) standing behind him. The Prophet (saws) beckoned him with his hand to keep on praying where he was. Abu Bakr (raa) raised his hand and praised Allah (swt) and then retreated till he came in the (first) row, and the Prophet (saws) went ahead and lead the people in the prayer.
When the Prophet (saws) finished the prayer, he turned towards the people and said, "O people! When something happens to you during the prayer, you start clapping. Really clapping is (permissible) for women only. If something happens to one of you in his prayer, he should say: ‘Subhan Allah’ (Glorified be Allah), for whoever hears him (saying so) will direct his attention towards him.
O Abu Bakr! What prevented you from leading the people in the prayer when I beckoned to you (to continue)?" Abu Bakr (raa) replied, "It did not befit the son of Abu Quhafa to lead the prayer in front of the Prophet (saws).
Peacemaking – Sahih Bukhari: Volume 3, Book 49, Number 855