عَن الحارِثِ الْأَشْعَرِيِّ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ:" آمُرُكُمْ بِخَمْسٍ: بِالْجَمَاعَةِ وَالسَّمْعِ وَالطَّاعَةِ وَالْهِجْرَةِ وَالْجِهَادِ فِي سَبِيلِ اللَّهِ وَإِنَّهُ مَنْ خَرَجَ مِنَ الْجَمَاعَةِ قِيدَ شِبْرٍ فَقَدْ خَلَعَ رِبْقَةَ الْإِسْلَامِ مِنْ عُنُقِهِ إِلَّا أَنْ يُرَاجِعَ وَمَنْ دَعَا بِدَعْوَى الْجَاهِلِيَّةِ فَهُوَ مِنْ جُثَى جَهَنَّمَ وَإِنْ صَامَ وَصَلَّى وَزَعَمَ أَنَّهُ مُسْلِمٌ ". رَوَاهُ أَحْمد وَالتِّرْمِذِيّ
Copy

Abu Sa'id reported God’s Messenger as saying, “The one who will be dearest to God and nearest to Him in station of the day of resurrection will be a just imam, and the one who will be most hateful to God on the day of resurrection and will receive the severest punishment (or as a version has, will be farthest from Him in station) will be a tyrannical imam.” Tirmidhi transmitted it, saying this is a hasan gharib tradition.