Hadith 9419

حَدَّثَنَا قُتَيْبَةُ ، قَالَ : حَدَّثَنَا حَاتِمُ بْنُ إِسْمَاعِيلَ ، عَنْ حُمَيْدٍ الْخَرَّاطِ ، عَنِ الْمَقْبُرِيِّ ، عَنْ أَبِي هُرَيْرَة ، قَالَ : قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّم : " مَنْ جَاءَ مَسْجِدِي هَذَا ، لَمْ يَأْتِ إِلَّا لِخَيْرٍ يَتَعَلَّمُهُ فَهُوَ بِمَنْزِلَةِ الْمُجَاهِدِ فِي سَبِيلِ اللَّهِ ، وَمَنْ جَاءَ لِغَيْرِ ذَلِكَ فَهُوَ بِمَنْزِلَةِ رَجُلٍ يَنْظُرُ إِلَى مَتَاعِ غَيْرِهِ " .
It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: Whoever enters our mosque solely to learn or teach goodness is like a warrior in the path of Allah, and whoever comes for any other purpose is like someone who looks at something that belongs to someone else.
Hadith Reference مسند احمد / مسند المكثرين من الصحابة / 9419
Hadith Grading حکم دارالسلام: حدیث ضعیف ، اختلف في إسنادہ علی المقبري ، وحمید مختلف فیه