The Prophet Muhammad passed away in 632 CE. In his final years, he was not only a Prophet but had succeeded in conquering virtually all of the Arabian Peninsula and subduing the various Bedouin tribes who decided to convert to Islam. Therefore, when he died, his community and Arabia required leadership. Though the death of the Prophet meant that Islam as a religion was complete, the Qur’an as scripture and the Prophet’s teachings formed the source of Islam. So the function of the one to succeed the Prophet was not to act as a ‘Pope’ who speaks on behalf of God. Since the revelation is complete and Prophecy terminated after Prophet Muhammad, the only function of a leader would be to administer the politics of the Muslim community that was now dominant in Arabia.
The Sunni narrative is that the Prophet never appointed anyone to succeed him, since whoever would succeed him would not occupy a position of religious authority but only political authority. Therefore, the Sunnis say that after the Prophet died, it was up to the Muslim community to consult among themselves and elect someone qualified to succeed Prophet Muhammad only in the political and administrative sense. Historically, the Prophet’s disciples and the elders of his community in Medina ended up electing his close associate Abu Bakr to be the first successor, or Khalifa (anglicized as ‘Caliph’). The Sunnis say that Abu Bakr, because he was the Prophet’s most senior disciple, was best qualified to lead the community after the Prophet. The Sunnis admit that the Prophet never designated Abu Bakr as his successor, but gave some hints that he expected Abu Bakr to succeed him after his death, such as appointing Abu Bakr to lead the congregational prayers in the Mosque since the Prophet was in his final illness and too weak to go to the Mosque.