Language:
كتاب المرضى
75  
Patients
(12)
Chapter: If one visited a patient and the time of the Salat became due
(12)
باب إِذَا عَادَ مَرِيضًا فَحَضَرَتِ الصَّلاَةُ فَصَلَّى بِهِمْ جَمَاعَةً
Sahih al-Bukhari 5658

Narrated `Aisha:

During the ailment of the Prophet (ﷺ) some people came to visits him. He led them in prayer while sitting. but they prayed standing, so he waved to them to sit down. When he had finished the prayer, he said, "An Imam is to be followed, so when he bows, you should bow. and when he raises his head, you should raise yours, and if he prays sitting. you should pray sitting." Abu `Abdullah said Al-Humaidi said, (The order of ) "This narration has been abrogated by the last action of the Prophet (ﷺ) as he led the prayer sitting, while the people prayed standing behind him.'

حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا يَحْيَى، حَدَّثَنَا هِشَامٌ، قَالَ أَخْبَرَنِي أَبِي، عَنْ عَائِشَةَ ـ رضى الله عنها ـ أَنَّ النَّبِيَّ صلى الله عليه وسلم دَخَلَ عَلَيْهِ نَاسٌ يَعُودُونَهُ فِي مَرَضِهِ فَصَلَّى بِهِمْ جَالِسًا فَجَعَلُوا يُصَلُّونَ قِيَامًا، فَأَشَارَ إِلَيْهِمِ اجْلِسُوا، فَلَمَّا فَرَغَ قَالَ ‏ "‏ إِنَّ الإِمَامَ لَيُؤْتَمُّ بِهِ، فَإِذَا رَكَعَ فَارْكَعُوا وَإِذَا رَفَعَ فَارْفَعُوا، وَإِنْ صَلَّى جَالِسًا فَصَلُّوا جُلُوسًا ‏"‏‏.‏ قَالَ أَبُو عَبْدِ اللَّهِ قَالَ الْحُمَيْدِيُّ هَذَا الْحَدِيثُ مَنْسُوخٌ لأَنَّ النَّبِيَّ صلى الله عليه وسلم آخِرَ مَا صَلَّى صَلَّى قَاعِدًا وَالنَّاسُ خَلْفَهُ قِيَامٌ‏.‏
Reference : Sahih al-Bukhari 5658
In-book reference : Book 75, Hadith 18
USC-MSA web (English) reference : Vol. 7, Book 70, Hadith 562
  (deprecated numbering scheme)