The division of Muslims into Sunnis and Shiites began after the death of the prophet. The Sunnis wanted to elect a caliph (successor) in a more democratic way and the Shiites wanted the succession to stay within the family, like in a monarchy. The Sunnis then elected Abu Bakr as the successor, but the Shiites wanted Ali because he was the prophet's cousin and they wanted the rule to stay within the family.