After the Death of the Prophet
After the death of the Prophet, 'Ali who, (according to a tradition of absolute authority), was more knowledgeable of the Qur'an than any other man retired to his house and compiled the Qur'an in one volume in the order corresponding to its revelation. Before six months had elapsed after the death of the Prophet, the volume was completed and carried by camel to show to other people.
Just about a year after the death of the Prophet, the war of Yamamah took place in which seventy of the reciters were killed and the Caliphs conceived the idea of collecting the different chapters and verses into one volume. They feared that should a future battle take place and the rest of the qurra' be killed, the whole Qur'an would disappear with them.
Thus, on the orders of the Caliph, a group of the qurra' from amongst the companions including Zayd ibn Thabit, collected the chapters and verses (written on tablets, bones and date palm fronds and kept in the Prophet's house or the houses of reciters), and produced several hand-written copies of the complete Book. They then sent copies of this compilation to all areas of the Muslim domain.
After a time, during the rule of the third Caliph, it came to the attention of the Caliph himself that differences and inconsistencies were appearing in the copying down of the Qur'an; some calligraphers lacked precision in their writing and some reciters were not accurate in their recitation.
Since the word of God seemed threatened with alteration, the Caliph ordered that five of the qurra' from amongst the companions, (one of them being Zayd ibn Thabit who had compiled the first volume), produce other copies from the first volume which had been prepared on the orders of the first Caliph and which had been kept with Hafsah, the wife of the Prophet and daughter of the second Caliph.
The other copies, already in the hands of Muslims in other areas, were collected and sent to Medina where, on orders of the Caliph, they were burnt (or, according to some historians, were destroyed by boiling). Thus several copies were made, one being kept in Medina, one in Mecca, and one each sent to Sham (a territory now divided into Syria, Lebanon, Palestine and Jordan), Kufa and Basra.
It is said that beside these five, one copy was also sent to Yemen and one to Bahrein. These copies were called the Imam copies and served as original for all future copies. The only difference of order between these copies and the first volume was that the chapters "Spirits of War" and "Immunity" were written in one place between "The Heights" and "Jonah."