All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Sunnis hold different opinions about whether Abu Bakr should have been given the caliphate by virtue of the Sharee'ah texts, or by consultation. However, their views are relatively similar because they all agree that Abu Bakr should have received the caliphate regardless, unlike the Shiites who reject this and consider it usurpation. The Shiites, moreover, claim that the Prophet, sallallaahu ‘alayhi wa sallam , stated that ‘Ali had to take over the caliphate. The texts they adopt as evidence to support their view are either inauthentic or contradict sound reason.
On the other hand, it is not true that the Sunnis cannot specify the Twelve Imaams who are mentioned in Saheeh Al-Bukhari, as claimed by the Shiites. The Sunnis have an explanation for the Hadeeth in question and other relevant Hadeeths and can reconcile them, as we will discuss below. However, it should be noted that no relationship exists between the Twelve Imaams in the Hadeeth and the Shiites’ creed.
This is the explanation:
Jaabir ibn Samurah narrated on the authority of the Prophet, sallallaahu ‘alayhi wa sallam, that he had said that there would be twelve ‘princes’, all of whom would be from Quraysh. [Al-Bukhari, Muslim, Abu Daawood and At-Tirmithi]
The wording of Muslim states that there will, inevitably, be twelve caliphs.
Another version in Muslim states that Islam will continue to be powerful until Twelve Imams have ruled.
A narration in Abu Daawood states that these Twelve Imaams will be agreed upon by the Muslim nation.
These texts have no relationship to the Shiites’ claims about the caliphate because the Muslim nation never agreed on the persons whom the Shiites regarded as caliphs, and there were no caliphs among them except ‘Ali and Al-Hasan .
Their statement suggests that Islam was not powerful during the reign of Abu Bakr ‘Umar and ‘Uthmaan . This is totally contradictory to reason, reality and the Sharee‘ah, in which it is stated that the best age was that of the Companions and then the Taabi‘is’, according to the Hadeeth narrated in Al-Bukhari and Muslim on the authority of ‘Abdullaah ibn Mas‘ood .
Scholars maintain different opinions as to who were the Twelve Imaams. The predominant opinion is that which is preferred by Al-Qaadhi ‘Iyaadh and Al-Haafith Ibn Hajar . According to them, the Twelve Imaams reigned when Islam was powerful, because the Hadeeth indicated that the Muslim nation would agree upon them.
Depending on historical background, Ibn Hajar gave evidence for the abovementioned opinion. According to him, the Muslims’ agreement refers to the Bay‘ah (pledge of loyalty). The truth is that people agreed upon Abu Bakr then upon ‘Umar then upon ‘Uthmaan then upon ‘Ali until Mu‘aawiyah, was nominated for the caliphate by virtue of the decision issued by the "Two arbiters" after the battle of Siffeen but he was unanimously agreed upon only after his reconciliation with Al-Hasan . Afterwards, people agreed on Yazeed ibn Mu‘aawiyah and Al-Husayn did not assume the post of the Caliph because he had already been killed. Disagreement began after Yazeed died. After that, people agreed on ‘Abdul-Malik ibn Marwaan since Ibn Az-Zubayr had been killed.
The pledge was given later to ‘Abdul-Malik’s four sons: Al-Waleed Sulaymaan Yazeed and Hishaam . ‘Umar ibn ‘Abdul-‘Azeez reigned during the interval between Sulaymaan and Yazeed . Apart from the four rightly guided caliphs, another seven were numerated. The twelfth was Al-Waleed ibn Yazeed ibn ‘Abdul-Malik who received the pledge after the death of his uncle Hishaam . Al-Waleed ruled for four years and then was killed. After his death, turmoil spread and fierce controversies arose, conditions changed and afterwards it was reported that people did not unanimously agree on a caliph after that.
Allaah Knows best.