The Qur’aan continued to be preserved in the hearts of the Sahaabah who had memorized it, and on the skins and other materials until the time of the caliph Abu Bakr al-Siddeeq (may Allaah be pleased with him). During the Riddah wars many of the Sahaabah who had memorized the Qur’aan were killed, and Abu Bakr (may Allaah be pleased with him) was afraid that the Qur’aan would be lost. So he consulted the senior Sahaabah about compiling the Qur’aan in a single book so that it would remain preserved and would not be lost. He entrusted this mission to the chief of memorizers Zayd ibn Thaabit (may Allaah be pleased with him). Al-Bukhaari narrated in his Saheeh (4986) that Zayd ibn Thaabit (may Allaah be pleased with him) said:
Abu Bakr al-Siddeeq sent for me when the people of al-Yamaamah had been killed [i.e., a number of the Prophet's Companions who fought against the false prophet Musaylimah]. (I went to him) and found ‘Umar ibn al-Khattaab sitting with him. Abu Bakr then said (to me), “ ‘Umar has come to me and said: ‘Casualties were heavy among the Qurra' of the Qur'aan (i.e. those who knew the Qur’aan by heart) on the day of the battle of al-Yamaamah, and I am afraid that more heavy casualties may take place among the Qurra' on other battlefields, whereby a large part of the Qur’aan may be lost. Therefore I suggest that you (Abu Bakr) order that the Qur’aan be collected.” I said to 'Umar, "How can you do something that the Messenger of Allaah (peace and blessings of Allaah be upon him) did not do?" 'Umar said, "By Allah, this is something good." 'Umar kept on urging me to accept his proposal till Allaah opened my heart to it and I began to realize the good in the idea which 'Umar had realized." Then Abu Bakr said (to me). “You are a wise young man and we do not have any suspicion about you, and you used to write the Divine Inspiration for the Messenger of Allaah (peace and blessings of Allaah be upon him). So search for (the fragmentary scripts of) the Qur’aan and compile it in one book." By Allah If they had ordered me to move one of the mountains, it would not have been heavier for me than this ordering me to compile the Qur’aan. Then I said (to Abu Bakr), "How can you do something that the Messenger of Allaah (peace and blessings of Allaah be upon him) did not do?" Abu Bakr replied, "By Allaah, it is a good thing." Abu Bakr kept on urging me to accept his idea until Allaah opened my heart to that to which He had opened the hearts of Abu Bakr and 'Umar. So I started looking for the Qur’aan and collecting it from (what it was written on) palm stalks, thin white stones and also from the men who knew it by heart, until I found the last Verse of Soorat al-Tawbah with Abu Khuzaymah al-Ansaari, and I did not find it with anybody other than him. The verse is (interpretation of the meaning):
"Verily, there has come unto you a Messenger (Muhammad) from amongst yourselves. It grieves him that you should receive any injury or difficulty...” [al-Tawbah 9:128] until the end of Soorat Baraa’ah (i.e., al-Tawbah).
Then the complete manuscript (copy) of the Qur’aan remained with Abu Bakr until he died, then with 'Umar until the end of his life, and then with Hafsah, the daughter of 'Umar (may Allaah be pleased with him).
The Sahaabi Zayd ibn Thaabit (may Allaah be pleased with him) knew the Qur’aan by heart but he was methodical in his confirmation; he would not agree to write down any verse until two of the Sahaabah testified that they had heard it from the Messenger of Allaah (peace and blessings of Allaah be upon him).
This Mus-haf (written copy of the Qur’aan) remained in the hands of the caliphs until the time of the Rightly-Guided Caliph ‘Uthmaan ibn ‘Affaan (may Allaah be pleased with him). The Sahaabah (may Allaah be pleased with them) had dispersed to different lands, and they used to recite the Qur’aan according to what they had heard of the seven recitations from the Messenger of Allaah (peace and blessings of Allaah be upon him), and each of their students used to recite according to what he had heard from his shaykh. If a student heard someone reciting in a manner different from what he knew, he would denounce him and accuse him of making a mistake, and this went on until the Sahaabah feared that there would be fitnah (trouble) between the Taabi’een and successive generations. So they thought that they should unite the people in following one recitation, which was in the dialect of Quraysh in which the Qur’aan had first been revealed, so as to dispel any disputes and resolve the matter. ‘Uthmaan (may Allaah be pleased with him) was consulted, and he agreed with this opinion.
Al-Bukhaari narrated in his Saheeh (4988) from Anas ibn Maalik that Hudhayfah ibn al-Yamaan came to ‘Uthmaan at the time when the people of Shaam (Syria) and the people of Iraq were waging war to conquer Armenia and Azerbaijan. Hudhayfah was alarmed by their (the people of Sham and Iraq) differences in the recitation of the Qur’aan, so he said to 'Uthmaan, "O Ameer al-Mu’mineen! Save this nation before they dispute about the Book (Qur’aan) as the Jews and the Christians did before." So 'Uthmaan sent a message to Hafsah saying, "Send us the manuscript of the Qur’aan so that we may make copies of the Mus-haf and we will return the manuscript to you."
Hafsah sent it to 'Uthmaan. Then 'Uthmaan ordered Zayd ibn Thaabit, 'Abdullah ibn al-Zubayr, Sa’eed ibn al-‘Aas and ‘Abd al-Rahmaan ibn Haarith ibn Hishaam to copy out the manuscripts. 'Uthmaan said to the three men who were from Quraysh (the tribe of which the Prophet (peace and blessings of Allaah be upon him) was a member), “In case you disagree with Zayd ibn Thaabit on any point in the Qur’aan, then write it in the dialect of Quraysh, for the Qur’aan was revealed in their tongue." They did so, and when they had written many copies, 'Uthmaan returned the original manuscripts to Hafsah.
'Uthmaan sent to every Muslim province one copy of what they had copied, and ordered that all the other Qur'aanic materials, whether written in fragmentary manuscripts or whole copies, be burnt.
Ibn Shihaab said: Khaarijah ibn Zayd ibn Thaabit told me that he heard Zayd ibn Thaabit say: “When we made copies of the Mus-haf I missed a verse of al-Ahzaab that I used to hear the Messenger of Allaah (peace and blessings of Allaah be upon him) recite. So we searched for it and we found it with Khuzaymah ibn Thaabit al-Ansaari. (The verse was) ‘Among the believers are men who have been true to their covenant with Allaah’ [al-Ahzaab 33:23 – interpretation of the meaning]. So we put it in its place in its soorah in the Mus-haf.”
Thus an end was put to dispute and the Muslims were united. The Qur’aan has remained and will remain narrated from generation to generation and preserved in men's hearts until the Day of Resurrection. This is how Allaah has preserved His Book, in confirmation of the verse in which He says (interpretation of the meaning):
“Verily, We, it is We Who have sent down the Dhikr (i.e. the Qur’aan) and surely, We will guard it (from corruption)”
And Allaah knows best.