Yes it was a fight for the Caliphate. The Prophet nominated 4 caliphs in order, Abu Bakr, Umar, Uthman and Ali. After the Prophets death, Abu Bakr was nominated first Caliph and Aisha (the Prophet's wife and Abu Bakr daughter) supported him. A separate group wanted Ali, the Prophets nephew to be first Caliph (since he was a blood relative) and after some infighting they formed a breakaway group called the Shias