After the death of the Prophet Muhammad, the entire Quran continued to be remembered in the hearts of the early Muslims. Hundreds of the early Companions of the Prophet had memorized the entire revelation, and Muslims daily recited large portions of the text from memory. Many of the early Muslims also had personal written copies of the Quran recorded on various materials.
Ten years after the Hijrah (632 C.E.), many of these scribes and early Muslim devotees were killed in the Battle of Yamama. While the community mourned the loss of their comrades, they also began to worry about the long-term preservation of the Holy Quran. Recognizing that the words of Allah needed to be collected in one place and preserved, the Caliph Abu Bakr ordered all people who had written pages of the Quran to compile them in one place. The project was organized and supervised by one of the Prophet Muhammad’s key scribes, Zayd bin Thabit.
The process of compiling the Quran from these various written pages was done in four steps:
Zayd bin Thabit verified each verse with his own memory.
Umar ibn Al-Khattab verified each verse. Both men had memorized the entire Quran.
Two reliable witnesses had to testify that the verses were written in the presence of the Prophet Muhammad.
The verified written verses were collated with those from the collections of other Companions.
This method of cross-checking and verifying from more than one source was undertaken with the utmost care. The purpose was to prepare an organized document which the entire community could verify, endorse, and use as a resource when needed.
This complete text of the Quran was kept in the possession of Abu Bakr, and then passed on to the next Caliph, Umar ibn Al-Khattab. After his death, they were given to his daughter Hafsah (who was also a widow of the Prophet Muhammad).