عَنِ الْحَسَنِ مُرْسَلًا قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ جَاءَهُ الْمَوْتُ وَهُوَ يَطْلُبُ الْعِلْمَ لِيُحْيِيَ بِهِ الْإِسْلَامَ فَبَيْنَهُ وَبَيْنَ النَّبِيِّينَ دَرَجَةٌ وَاحِدَةٌ فِي الْجَنَّةِ» . رَوَاهُ الدَّارمِيّ
Translation

‘Abdallah b. ‘Amr told of God’s messenger coming upon twogroups in his mosque and saying, “They are both engaged in what isgood, but one of them is superior to the other. These ones are praying and supplicating God who, if He wills, may answer their prayersbut, if He wills, may refuse them. Those ones are learning knowledge*and teaching the ignorant, so they are superior. I was sent only as ateacher.” He then sat down among them. Darimi transmitted it. *The text has al-fiqh au al-'ilm, fiqh and ‘ilm having the same meaning, but the transmitter of thetradition was not sure which word was used by the Prophet on this occasion.