Mishkat al-Masabih 257
وَعَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَرَّ بِمَجْلِسَيْنِ فِي مَسْجِدِهِ فَقَالَ: «كِلَاهُمَا عَلَى خَيْرٍ وَأَحَدُهُمَا أَفْضَلُ مِنْ صَاحِبِهِ أَمَّا هَؤُلَاءِ فَيَدْعُونَ اللَّهَ وَيَرْغَبُونَ إِلَيْهِ فَإِنْ شَاءَ أَعْطَاهُمْ وَإِنْ شَاءَ مَنَعَهُمْ. وَأَمَّا هَؤُلَاءِ فَيَتَعَلَّمُونَ الْفِقْهَ أَوِ الْعِلْمَ وَيُعَلِّمُونَ الْجَاهِلَ فَهُمْ أَفْضَلُ وَإِنَّمَا بُعِثْتُ مُعَلِّمًا» ثمَّ جلس فيهم. رَوَاهُ الدَّارمِيّ
From ʿAbdullah ibn ʿAmr, that the Messenger of Allah ﷺ passed by two gatherings in his mosque and said: "Both of them are upon good, and one of them is better than the other. As for these, they are calling upon Allah and longing for Him; if He wills He gives them, and if He wills He withholds from them. As for these, they are learning fiqh, or knowledge, and teaching the ignorant, so they are better. And I was sent only as a teacher." Then he sat among them. Reported by ad-Darimi.