Based on Historical data.
By the 6th century A.D., Christianity had become the state religion of the Byzantine Empire. In the early 7th, The Byzantines and Sassanians (Persian Zoroastrians) went to war against each other, as they often had done over the previous 3 centuries, but this time, the conflict turned into a life and death struggle. The Byzantines won because the Emperor (Heraclius) was able to leverage Christianity to turn the conflict into an existential holy war. As a result, the Sassanian Empire was wiped out and the Byzantine (East Roman one) severely crippled by the unusual intensity of the fighting. The Arabs, who had been auxiliaries on both sides during the war took advantage of the power vacuum to carve out their own empire. By the mid-7th century, the Arabs controlled Iran, Mesopotamia, Syria and Egypt (i.e. all of the former Sassanian Empire + the richest Byzantine provinces).
The problem of the new Arab "Emperors" (Caliphs) was that they could not base their legitimacy on an unifying religion, contrary to the Byzantines, so they decided to invent one. At first, "Islam" was nothing more than a kind of "generic monotheism" calculated to be a kind of neutral ground between Judaism, Zoroastrianism and the various versions of Christianity that existed in the newly formed Arab Empire. The Quran is the result of this early period. Then, in the mid-8th century, a new dynasty of Caliphs, the Abbasids, decided to consolidate the different stories that had gained currency over the previous century and commissioned a group of scholars to fashion a united and consistent narrative. This effort gave rise to the Sira and the Hadith. In the process, the character of Muhammad was invented (based on a name which was almost certainly originally an attribute of Jesus, meaning "the chosen one") and retroactively declared to have been a prophet active at the time of the Persian-Sassanian war.
There is absolutely no trace of this "Muhammad" in the contemporary historical record of the early 7th century. The earliest texts that speak of him date to the second half of the 8th. Since the 7th century had been a very troubled period, with a lot of conquests, counter-conquests and migration of peoples, it was easy to pretend that a guy had prophesied in the early part of that period and written a book, the Quran, that everybody in the region knew because it had been the (hitherto anonymous) religious manual of the previous dynasty. Basically, Muhammad was retconned into the Islamic narrative by the propaganda ministry of the Abbasids (who were duly declared to be his descendants).
The Shia/Sunni split dates back from this period (although it was also eventually back-dated). The Shia were a faction of Iran-based Arab colonists from North-Eastern Iran (Khurasan) headed by a man named Abu-Muslim. This group was the main support of the Abbasids in the early phase of their war against the previous Khalifal dynasty (The Umayyads). Eventually, the Abbassid ditched them when they were able to rally to their cause other Arab groups that were on bad terms with the Khurasanis. The Shia thus have some reason to claim that their creed is "original" Islam. What they follow is the descendant of the early Abbasid propaganda narrative while Sunnism is a later version, modified to suit the needs of the new Abbasid supporters who join the dynasty's cause after they had ditched the Khurasanis. The whole thing was later edited and streamlined by the scholar-propagandists who served the Abbasids in the first 50 years of their rule. These "scholars" wrote the Sira (i.e. the imaginary biography of the prophet) and "compiled" (i.e. invented) the Hadith collections of "sayings" of the prophet.
During this standardization process, "Islam" stabilized as a separate religion somewhat in between Christianity and Judaism, with a distinct preference for material from the latter (the prophet stories, the legalistic lore, etc). It must be remembered that the Talmudic compilation process had just been completed a century or 2 before. Many Jews (supposedly "converted to Islam") play a significant role in the process of Hadith formation, most notably one Kab al-Ahbar. It is also quite probable that Ja'far al-Sadiq, a character who plays a pivotal role in both the Shia and Sunni narratives, was based on someone who was originally a Mesopotamian Jewish legal scholar of the Talmudic tradition.