'Most Muslims at the time (the forebears of the Sunnis) followed the tribal tradition according to which a council of elders would choose the most senior and respected elder to become the head of the Islamic community, or umma. Early Muslims found justification for this practice in the Prophet's declaration that "my community will never agree in error." For the Sunnis, the successor to the Prophet would need no exceptional spiritual qualities but would merely have to be an exemplary Muslim who could ably and virtuously direct the religious and political affairs of the community. The Sunnis chose Abu Bakr, the Prophet's close friend and father-in-law, as his successor or caliph. A small group of the Prophet's companions believed that the Prophet's cousin and son-in-law, Ali ibn Abi Talib, was more qualified for the job and that it had been the wish of the Prophet that he lead the Muslim community. In the end consensus prevailed and all dissenters, Ali included, accepted Abu Bakr's leadership.
Abu Bakr was succeeded by Umar, Uthman, and finally Ali. Sunnis call these four men, whose successive terms spanned the three decades from 632 to 661, the Rightly Guided, or Rashidun, Caliphs. They had all been close companions of the Prophet and were knowledgeable in matters of religion. For Sunnis, the time of these caliphs was Islam's golden age, an era when political authority continued to be informed by the pristine values of the faith nad hwen Muslim society remained close to its spiritual roots.
Even the era of the Rightly Guided Caliphs, however, proved to be far from harmonious. Umar was killed by an Iranian prisoner of war, but most notably, Uthman was murdered in 656 by mutinous Muslim soldiers, his blood spilling onto the Quran that he was reading. The young Muslim community was in shock at the spectacle of Muslims murdering the successor to the Prophet. The aftereffects of Uthman's murder plagued the caliphate of Ali. He faced mutinies - including one that included Abu Bakr's daughter and the Prophet's wife, Ayesha - and was hard-pressed to restore calm, and soon confronted a strong challenge from Uthman's cousin Muawiya, the governor of Damascus, who demanded that Ali avenge Uthman's murder. The tribal demand for justice soon took on the quality of a power struggle between the new caliph and the governor. A civil war between the caliph's army and Muawiya's forces ensued, further miring the Muslim community in conflict and confusion. That war ended only when Ali was assassinated by angry extremists who blamed both him and Muawiya for the crisis. The nearly century-long reign of the Umayyad dynasty (661-750) had begun, and Damascus would be its center.
Sunni Muslims accepted Muawiya's rise. He lacked religious authority, but he guaranteed the basic order that the faith was thought to need. Under the Umayyads the caliphs became both pope and caesar, delegating authority over religious matters to professional religious scholars and functionaries, the ulama. The Sunnis were well on their way to embracing their traditional stance of accepting a regime's legitimacy so long as it provided order, protected Islam, and left religious matters to the ulama. The famous saying "Better sixty years of tyranny than a single day of civil strife" captures the spirit of the Sunni position.
Not all Muslims were content with this formula, and Shiism arose in part on the foundation of their dissent. Ali's murder, the transformation of the caliphate into a monarchy, and the de facto separation of religious and political authorities under the Umayyads led a minority of Muslims to argue that what had come to pass was the fruit not of God's mandate but of man's folly. They saw the roots of the problem going back to the choice of the first successor to the Prophet. Muslims had erred in choosing their leaders, and that error had mired their faith in violence and confusion. The dissenting voices rejected the legitimacy of the first three Rightly Guided Caliphs, arguing that God would not entrust his religion to ordinary mortals chosen by the vote of the community and that Muhammad's family - popularly known as the ahl al-Bayt (people of the household) - were the true leaders of the Muslim community, for the blood of the Prophet ran in their veins and they bore his charisma and the spiritual qualities that God had vested in him. Abu Bakr and Umar were particularly at fault for ignoring the Prophet's wishes about how his authority should be handed on and convening a gathering at Saqifah Bani Saeda to elect his successor. This view would become foundational to Shiism.'
-Vali Nasr, The Shia Revival