[Machine] The Messenger of Allah ﷺ entered the mosque and saw two groups. One group was supplicating to Allah and seeking closeness to Him, while the other group was learning and teaching Islamic jurisprudence. The Messenger of Allah ﷺ said, "Both of these groups are on good and righteous path. However, the group that supplicates to Allah and seeks closeness to Him, if He wills, He gives them what they ask for, and if He wills, He withholds it from them. As for the group that learns and teaches the ignorant, I have been sent as a teacher, and these are better." So, he went and sat down with them.
أَنَّ رَسُولَ اللهِ ﷺ دَخَلَ الْمَسْجِدَ فَرَأَى مَجْلِسَيْنِ أَحَدُ الْمَجْلِسَيْنِ يَدْعُونَ اللهَ وَيَرْغَبُونَ إِلَيْهِ وَالآخَرُ يَتَعَلَّمُونَ الْفِقْهَ وَيُعَلِّمُونَ فَقَالَ رَسُولُ اللهِ ﷺ «كِلَا الْمَجْلِسَيْنِ عَلَى خَيْرٍ أَحَدُهُمَا أَفْضَلُ مِنَ الْآخَرِ أَمَا هَؤُلَاءِ فَيَدْعُونَ اللهَ وَيَرْغَبُونَ إِلَيْهِ إِنْ شَاءَ أَعْطَاهُمْ وَإِنْ شَاءَ مَنَعَهُمْ وَأَمَّا هَؤُلَاءِ فَيَتَعَلَّمُونَ وَيُعَلِّمُونَ الْجَاهِلَ وَإِنَّمَا بُعِثْتُ مُعَلِّمًا وَهَؤُلَاءِ أَفْضَلُ» وَأَتَاهُمْ حَتَّى جَلَسَ إِلَيْهِمْ