Muaz was leading his people in prayer when Haram came in, intending to water his palm trees. He entered the mosque to pray with the congregation, but when he saw that Muaz was prolonging the prayer, he shortened his own prayer and went off to water his palm trees.When Muaz finished his prayer, he was told that Haram had entered the mosque.
حدثنا إسماعيل حدثنا عبد العزيز بن صهيب عن أنس بن مالك وقال مرة أخبرنا عبد العزيز بن صهيب
كان معاذ يؤم قومه فدخل حرام وهو يريد أن يسقي نخله فدخل المسجد ليصلي مع القوم فلما رأى معاذا طول تجوز في صلاته ولحق بنخله يسقيه فلما قضى معاذ صلاته قيل له إن حراما دخل المسجد
Its isnad is sahih. Imam Ahmad repeated Ismail's isnad to show that Ibrahim sometimes said "haddathana" and sometimes said "anbaana." This is an extremely fine level of precision, so let the researchers who claim precedence bury their heads in the dust after our imams. The hadith is a reference to the hadith about lightening, and it will come in full at 12187.