the hearts of a faction among them had nearly swerved; then He turned to them in mercy—indeed He is Most Kind, Most Merciful toward them—and likewise to the three who were left behind, until the earth, vast as it is, felt constricted to them, and their own souls constricted as well, and they became convinced that there is no refuge from Allah except in Him. Then He accepted their repentance so that they might repent; truly Allah is the Ever-Relenting, the Merciful. This passage is among the last that were revealed in the Quran.
Some have said that the final surah to come down was His statement:
“When Allah’s help and victory arrive, and you see people entering Allah’s religion in crowds, then glorify your Lord with praise and seek His forgiveness. He is, indeed, Ever-Relenting.”
Thus Allah commanded His Messenger to seal his life’s work with glorification and seeking forgiveness.
In the two Sahih collections it is reported from ʿA’ishah—may Allah be pleased with her—that the Prophet, peace and blessings be upon him, used to say in his bowing and prostration: “Glory be to You, O Allah, our Lord, and praise belongs to You; O Allah, forgive me,” thereby implementing the Quran.
The two Sahihs also relate that he, peace and blessings be upon him, would say: “O Allah, forgive me my sin, my ignorance, my excess in my affairs, and whatever You know better than I…”