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.