among His servants, and there the disbelievers were doomed” (Ghafir 40:84–85).
When a person actually witnesses death and his appointed term arrives, it means he has despaired of life; at that moment his repentance is misplaced. After giving up hope of living and knowing that he will not remain, he then goes off to repent. This is repentance born of desperation, and it neither benefits him nor is it accepted from him; repentance must come earlier.
The second kind concerns people collectively. The Messenger of Allah—peace and blessings be upon him—said, “Migration will not cease until repentance ceases, and repentance will not cease until the sun rises from the west.” Once the sun rises from the west, repentance will no longer profit anyone. Allah the Exalted says: “On the Day when some of your Lord’s signs come, no soul will benefit from its faith if it had not believed before or earned any good through its faith” (al-Anʿām 6:158). The “some” referred to here, the Prophet—peace and blessings be upon him—explained, is the rising of the sun from the west.
Therefore, repentance must occur during a time when repentance is accepted; if it does not, the person has no repentance.
The scholars—may Allah have mercy on them—then differed as to whether repentance from one sin is accepted while one persists in another. There are three opinions on the matter. One group said: repentance from a given sin is valid even if he obstinately persists in another; his repentance from that sin is accepted, while the burden of the other sin remains upon him in any case.