“Sit down, for you have caused offence,” yet he did not order him to pray. Al-Ḥāfiẓ comments: “This is the line of argument taken by al-Ṭaḥāwī and others, but it is open to objection.” Al-Shawkānī adds: “Perhaps the explanation is that nothing precludes the possibility that he had already performed the two rak‘ahs in another part of the mosque before stepping over people’s necks, or that the incident occurred before the prayer was enjoined and neglecting it prohibited.”
All the other proofs they cite are equally inconclusive; for a full discussion see Nayl al-Awtār.
This prayer is known as tahiyyat al-masjid (1)—the greeting of the mosque—and it is not forfeited merely by sitting down, even when one has no excuse such as forgetfulness. The context in which the ḥadith was spoken makes this clear. Abū Qatādah (may Allah be pleased with him) said: “I entered the Messenger of Allah’s mosque while the people were present, and I sat down. The Messenger of Allah ﷺ said, ‘What kept you from praying two rak‘ahs before you sat down?’ I replied, ‘O Messenger of Allah, I saw you sitting and the people sitting.’ …,” and he related the rest of the report.
Muslim and Aḥmad transmitted this ḥadith, as mentioned a little earlier.
There is also a report on the subject from Jābir, which will follow shortly.