Hadithcore
Mishkat al-Masabih, 3719

‘Umar b. al-Khattab reported God’s Messenger as saying, “The one among God’s servants who will have the best position with God on the day of resurrection will be a just and kindly <i>iman</i>, but the man who will have the worst position with God on the day of resurrection will be a tyrannical and harsh <i>imam</i>.” Baihaqi transmitted in <i>Shuab al iman</i>.

وَعَنْ عُمَرَ بْنِ الْخَطَّابِ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِنَّ أَفْضَلَ عِبَادِ اللَّهِ عِنْدَ اللَّهِ مَنْزِلَةً يَوْمَ الْقِيَامَةِ إِمَامٌ عَادِلٌ رَفِيقٌ وَإِنَّ شَرَّ النَّاسِ عِنْدَ اللَّهِ مَنْزِلَةً يَوْمِ الْقِيَامَةِ إِمامٌ جَائِر خرق»

References1 variant
In-Book Reference
Book 18, Hadith 58