Revelation, memorisation and writing in the Prophet's lifetime
The Quran came down gradually through the angel Jibril. The Prophet ﷺ recited it to his Companions, and they learned it by heart. Allah assured him that he need not hurry to hold on to the revelation: "Do not move your tongue with it to hasten it. Upon Us is its collection and its recitation. When We have recited it, then follow its recitation. Then upon Us is its clarification" (Quran 75:16-19).
The Prophet ﷺ also had scribes who wrote down the revelation as it came, among them Zayd ibn Thabit (may Allah be pleased with him). The verses were written on palm stalks, thin stones, bones and other materials that were available. Scholars explain that the Prophet ﷺ directed where each verse belonged. So the arrangement of the verses within each surah was set during his lifetime. Scholars generally hold that the order of the surahs was also set in that period, though some say part of it was arranged by the Companions.
Each year Jibril reviewed the Quran with the Prophet ﷺ. Abu Hurayrah (may Allah be pleased with him) reported that it was reviewed once every year, but twice in the year in which the Prophet ﷺ passed away (Sahih al-Bukhari 4998). Scholars regard this final review as the basis for the arrangement and recitation of the Quran that we have today.



