Islamic tradition relates that Muhammad received his first revelation in the Cave of Hira during one of his isolated retreats to the mountains. Thereafter, he received revelations over a period of 23 years. According to hadith and Muslim history, after Muhammad emigrated to Medina and formed an independent Muslim community, he ordered many of his companions to recite the Quran and to learn and teach the laws, which were revealed daily. It is related that some of the Quraysh who were taken prisoners at the battle of Badr regained their freedom after they had taught some of the Muslims the simple writing of the time. Thus a group of Muslims gradually became literate. As it was initially spoken, the Quran was recorded on tablets, bones, and the wide, flat ends of date palm fronds. Most suras were in use amongst early Muslims since they are mentioned in numerous sayings by both Sunni and Shia sources, relating Muhammad's use of the Quran as a call to Islam, the making of prayer and the manner of recitation. However, the Quran did not exist in book form at the time of Muhammad's death in 632. There is agreement among scholars that Muhammad himself did not write down the revelation.
Sahih al-Bukhari narrates Muhammad describing the revelations as, "Sometimes it is (revealed) like the ringing of a bell" and Aisha reported, "I saw the Prophet being inspired Divinely on a very cold day and noticed the sweat dropping from his forehead (as the Inspiration was over)." Muhammad's first revelation, according to the Quran, was accompanied with a vision. The agent of revelation is mentioned as the "one mighty in power", the one who "grew clear to view when he was on the uppermost horizon. Then he drew nigh and came down till he was (distant) two bows' length or even nearer." The Islamic studies scholar Welch states in the Encyclopaedia of Islam that he believes the graphic descriptions of Muhammad's condition at these moments may be regarded as genuine, because he was severely disturbed after these revelations. According to Welch, these seizures would have been seen by those around him as convincing evidence for the superhuman origin of Muhammad's inspirations. However, Muhammad's critics accused him of being a possessed man, a soothsayer or a magician since his experiences were similar to those claimed by such figures well known in ancient Arabia. Welch additionally states that it remains uncertain whether these experiences occurred before or after Muhammad's initial claim of prophethood.
The Quran describes Muhammad as "ummi", which is traditionally interpreted as "illiterate," but the meaning is rather more complex. Medieval commentators such as Al-Tabari maintained that the term induced two meanings: first, the inability to read or write in general; second, the inexperience or ignorance of the previous books or scriptures (but they gave priority to the first meaning). Besides, Muhammad's illiteracy was taken as a sign of the genuineness of his prophethood. For example, according to Fakhr al-Din al-Razi, if Muhammad had mastered writing and reading he possibly would have been suspected of having studied the books of the ancestors. Some scholars such as Watt prefer the second meaning.
Based on earlier transmitted reports, in the year 632, after Muhammad died and a number of his companions who knew the Quran by heart were killed in a battle by Musaylimah, the first caliph Abu Bakr (d. 634) decided to collect the book in one volume so that it could be preserved. Zayd ibn Thabit (d. 655) was the person to collect the Quran since "he used to write the Divine Inspiration for Allah's Apostle". Thus, a group of scribes, most importantly Zayd, collected the verses and produced a hand-written manuscript of the complete book. The manuscript according to Zayd remained with Abu Bakr until he died. Zayd's reaction to the task and the difficulties in collecting the Quranic material from parchments, palm-leaf stalks, thin stones and from men who knew it by heart is recorded in earlier narratives. After Abu Bakr, Hafsa bint Umar, Muhammad's widow, was entrusted with the manuscript. In about 650, the third Caliph Uthman ibn Affan (d. 656) began noticing slight differences in pronunciation of the Quran as Islam expanded beyond the Arabian Peninsula into Persia, the Levant, and North Africa. In order to preserve the sanctity of the text, he ordered a committee headed by Zayd to use Abu Bakr's copy and prepare a standard copy of the Quran. Thus, within 20 years of Muhammad's death, the Quran was committed to written form. That text became the model from which copies were made and promulgated throughout the urban centers of the Muslim world, and other versions are believed to have been destroyed. The present form of the Quran text is accepted by Muslim scholars to be the original version compiled by Abu Bakr.
According to Shia and some Sunni scholars, Ali ibn Abi Talib (d. 661) compiled a complete version of the Quran shortly after Muhammad's death. The order of this text differed from that gathered later during Uthman's era in that this version had been collected in chronological order. Despite this, he made no objection against the standardized Quran and accepted the Quran in circulation. Other personal copies of the Quran might have existed including Ibn Mas'ud's and Ubay ibn Ka'b's codex, none of which exist today.
The Quran most likely existed in scattered written form during Muhammad's lifetime. Several sources indicate that during Muhammad's lifetime a large number of his companions had memorized the revelations. Early commentaries and Islamic historical sources support the above-mentioned understanding of the Quran's early development. The Quran in its present form is generally considered by academic scholars to record the words spoken by Muhammad because the search for variants has not yielded any differences of great significance. Although most variant readings of the text of the Quran have ceased to be transmitted, some still are. There has been no critical text produced on which a scholarly reconstruction of the Quranic text could be based. Historically, controversy over the Quran's content has rarely become an issue, although debates continue on the subject.
In 1972, in a mosque in the city of Sana'a, Yemen, manuscripts were discovered that were later proved to be the most ancient Quranic text known to exist at the time. The Sana'a manuscripts contain palimpsests, a manuscript page from which the text has been washed off to make the parchment reusable again—a practice which was common in ancient times due to scarcity of writing material. However, the faint washed-off underlying text (scriptio inferior) is still barely visible and believed to be "pre-Uthmanic" Quranic content, while the text written on top (scriptio superior) is believed to belong to Uthmanic time. Studies using radiocarbon dating indicate that the parchments are dated to the period before 671 AD with a 99 percent probability.
In 2015, fragments of a very early Quran, dating back to 1370 years ago, were discovered in the library of the University of Birmingham, England. According to the tests carried out by Oxford University Radiocarbon Accelerator Unit, "with a probability of more than 95%, the parchment was from between 568 and 645". The manuscript is written in Hijazi script, an early form of written Arabic. This is possibly the earliest extant exemplar of the Quran, but as the tests allow a range of possible dates, it cannot be said with certainty which of the existing versions is the oldest. Saudi scholar Saud al-Sarhan has expressed doubt over the age of the fragments as they contain dots and chapter separators that are believed to have originated later.