The Messenger of Allah ﷺ met me on one of the paths of Madinah while I was in a state of major ritual impurity. I slipped away, went and bathed, then returned.He asked, "Where were you, Abu Hurayrah?"I replied, "I was in a state of major impurity, and I disliked sitting with you without being purified."He said, "Glory be to Allah, the Muslim does not become impure."In Bishr's version of the hadith, he said, Humayd narrated to us, Bakr narrated to me.
حدثنا مسدد حدثنا يحيى وبشر عن حميد عن بكر عن أبي رافع
لقيني رسول الله ﷺ في طريق من طرق المدينة وأنا جنب فاختنست فذهبت فاغتسلت ثم جئت فقال أين كنت يا أبا هريرة قال قلت إني كنت جنبا فكرهت أن أجالسك على غير طهارة فقال سبحان الله إن المسلم لا ينجس و قال في حديث بشر حدثنا حميد حدثني بكر
Bukhari transmitted it in the chapter on ghusl, the section on the sweat of a person in a state of major impurity and that a Muslim does not become impure, hadith no. 283, and Muslim transmitted it in the chapter on menstruation, the section on the evidence that a Muslim does not become impure, hadith no. 371, from the hadith of Yahya bin Saeed Qattan, with the same wording.