As I know, there is an ongoing discussion on who the first caliph should have been, but what did the holy prophet Muhammed s.a.s. said about this matter? What was his commandment? Is there a safe source for this information?
Muslims divided into two teams because of this:
The first team
A.k.a Shia are who believe that the Prophet Muhammad (PBUH) selected Ali ibn Abi Talib as a caliph after him in various situations, the most famous one is Hadith Al-Ghadeer:
O people, Allah the Most Kind the Omniscient has told me that no apostle lives to more than half the age of him who had preceded him. I think I am about to be called (to die) and thus I must respond. I am responsible and you are responsible, then what do you say?' They said, 'We witness that you have informed, advised and striven. May Allah bless you.' He said, 'Do you not bear witness thatthere is no god but Allah and that Muhammad is His servant and Apostle, and that His Heaven is true, His Hell is true, death is true, the Resurrection after death is true, that there is no doubt that theDay of Judgment will come, and that Allah will resurrect the dead from their graves?' They said, 'Yes, we bear witness'. He said, 'O Allah, bear witness.' Then he said, 'O people, Allah is my Lord and I am the lord of the believers. I am worthier of believers than themselves. Of whomsoever I had been Master (Mawla), Ali here is to be his Master. O Allah, be a supporter of whoever supports him (Ali) and an enemy of whoever opposes him and divert the Haq to Ali. This is a full research about the Hadith+ Sources
The second team
A.k.a Sunni are who believe that the prophet (PBUH) didn't choose a caliph after him and the Muslims were free to choose whom they saw best as caliph by Shura, for more information, see this article