ENOfficial
`Uthman b. 'Affan reported God's messenger as saying, "Three groups will make intercession on the day of resurrection, the prophets, next the learned, next the martyrs." Ibn Majah transmitted it.
Source: sunnah.com
Other translations
Arabic
وَعَنْ عثمان بن عَفَّان قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: " يُشَفَّعُ يَوْمَ الْقِيَامَةِ ثَلَاثَةٌ: الْأَنْبِيَاءُ ثُمَّ الْعلمَاء ثمَّ الشُّهَدَاء ". رَوَاهُ ابْن مَاجَه
sunnah.com