[A Detailed Exposition of Ahl al-Sunnah’s View of the Imamate]
It is well known that Ahl al-Sunnah do not dispute that, after the four caliphs, some of those who wielded power appointed a person to office even though someone else was more deserving of it. Umar ibn Abd al-Azīz wished to appoint al-Qāsim ibn Muhammad (1) as his successor, but he was unable to do so because those who wielded power did not agree (2) to it, (3 and because the succession covenant had already designated Yazīd ibn Abd al-Malik to succeed him, so Yazīd was the heir apparent 3) (3).
Accordingly, where those who wielded power gave precedence to the less qualified and passed over the more qualified, or where someone assumed office through his own strength and that of his followers, wrongfully and unjustly, the sin entailed by this appointment falls upon whoever neglected the obligation despite being able to fulfil it, or assisted in wrongdoing. As for one who neither committed injustice nor assisted an oppressor, but assisted only in righteousness and piety, he bears no blame in this matter.
It is well known that the righteous among the believers assist rulers only in righteousness and piety; they do not assist them in sin and transgression. This is therefore analogous to the imam who, according to the revealed law, ought to be given precedence because he is more proficient in reciting the Quran and more knowledgeable of the sunnah, or because he emigrated earlier and is older. If those who wield power instead put forward someone inferior to him, what sin is borne by the worshippers praying behind that imam when they cannot pray except behind him?