When the Prophet Muhammed, May Peace Be Upon Him, died in 632 A.D., there were two groups. One group believed that he was dead and that his teachings should be studied and followed. They became the Sunni Muslims. The Sunnis do not believe in a religious ruler. They follow secular political rulers.
The other group believed that the descendants of Muhammed had inherited his spiritual authority and his right to rule over the Kingdom of Islam. They became the Shiites.
According to the Shiites, Ali should have become the Imam, or ruler of the Muslims, upon the death of Muhammad. However, Ali was still young and, by majority rule, Abu Bakr was elected as the first ruler who followed Muhammed. However, Abu Bakr only lived two more years, so, when he died, another election was held. This time, Ali again was passed over and Umar became the Imam. Umar became one of the great men of history. It was the armies of Umar which swept across North Africa and eventually conquered Spain, although Spain was not conquered until after Umar had died.
When Umar died, Ali was once again passed over and Uthman became the ruler. He was not very successful and died under a cloud.
When Uthman died, Ali finally got his chance. He was elected. However, many Muslims still did not want Ali. They followed a mere woman, Ayesha, who was the daughter of Abu Bakr, had been married to Muhammed when she was only nine years old. She was an extremely competent and capable woman, who wrote most of the history of the life of Muhammed which has come down to us today.
The Army of Ayesha fought a battle against the Army of Ali. This is known as "The Battle of the Camel", because Ayesha led her troops while under an Islamic veil sitting on the top her camel. Eventually, Ayesha's camel was captured. The forces of Ayesha were defeated. Ayesha was taken prisoner.
However, Ali died shortly thereafter. According to the Shiites, Ali died when attacked from behind while praying. The Sunnis have a different version of how Ali died. Ayesha lived to a ripe old age of more than 80.
According to the Sunnis, the next ruler of Islam was a Syrian named Muawiya who had been an enemy of Ali and who had not been one of the companions of the Prophet. However, according to the Shiites, the next rightful ruler was Hassan, the eldest son of Ali. When Hassan died, his younger brother, Hussein, should have become the ruler, according to the Shiites.
Number six in the order of succession, according to the Shiites, was Imam Jaffar as-Sadiq. Imam Jaffar was by far the most learned and scholarly of the descendants of Ali. He wrote books.
When Imam Jaffar died, there was a dispute. His eldest son was named Ismail and therefore he had the right to rule. However, Ismail had died before his father. Therefore, some said that Ismail's eldest son was the next ruler. However, other Shiites said and that Jaffar himself had willed that his third son would become the next Imam.
Those who believe that the third son was the rightful ruler of Islam are called the "Twelvers", because they believe that there were 12 Imams. The last one is still alive, according to the Twelvers, and has been hiding in a cave for the last more than one thousand years. He will come out and resume his rule soon, the Twelvers say.
The Twelvers are by far the largest group of Shiite Muslims, because the Iranians are Twelvers. Some from Iran claimed when Imam Khomeini was alive that he was in fact the "Disappearing Imam" who had come back to rule. Others said that he was the Mehdi or "Promised Messiah".
Some of those who claim that Ismail, the eldest son of Imam Jaffar, was the rightful ruler of all Muslims, are known as "Aga Khanis" or "Ismailis". They are also known as the "Seveners", because Imam Jaffar was the seventh and, according to them, the last Imam.
According to the Ismailis, starting from Ali, the eldest son has always inherited the right to rule. The present Aga Khan, Prince Karim, is the 49th direct descendant in a male line down from Ali. His great-grandfather, Hasan Ali Shah, was given the title of Aga Khan by the Sultan of Persia.
And that is why Prince Karim is now the Aga Khan.
No doubt the above is not entirely accurate. I have learned this not from reading it in any book, but because numerous Muslims have explained this to me. For some reason, this is a subject that nobody writes about.
Therefore, if I have said something which is not entirely accurate, don't put out a fatwa out on me right away. Instead, send me an e-mail with the correct information.