Repentance, then, wards off blame and punishment in a measure suited to the state of the one who repents. The prophets—may Allah’s blessings and peace be upon them—never put repentance off; rather, they hastened and even raced to it. They neither delayed nor persisted in any sin; indeed, they are protected from such persistence. Should one of them defer repentance for a short while, Allah expiates that lapse through the trial He sends him—just as He did with Dhū’n-Nūn, Jonah, upon him be peace—according to the well-known view that his being cast into the sea occurred after his prophethood. Those who hold that it happened before his prophethood have no need for this explanation.
A person who repents from disbelief or other sins may, in fact, surpass one who never fell into disbelief or sin at all. If such a penitent can be the better of the two, then he is more entitled to prophethood than someone who is his inferior in virtue. Allah has disclosed the sins of Joseph’s brothers—yet they were the Tribes whom He later made prophets. He, the Exalted, also says: “So Lot believed in him and said, ‘I am indeed migrating to my Lord.’” (1) Thus Lot believed in Abraham—upon him peace—after which Allah sent him to the people of Lot.
Regarding Shuʿayb, the Most High says:
“The arrogant leaders of his people said, ‘Shuʿayb, we will surely expel you and those who have believed with you from our town unless you return to our faith.’ He replied, ‘Even though we detest it? We would be forging a lie against Allah were we to return to your faith after He has delivered us from it. It is not for us to return to it unless Allah, our Lord, so wills. Our Lord encompasses everything in knowledge; in Allah we place our trust. Our Lord, decide between us and our people in truth, for You are the best of those who decide.’” (2)
And He, Most High, says: “The disbelievers said to their messengers, ‘We will surely expel you from our land unless you return to our religion…’” (3)
From all this it becomes clear that what counts is the perfection of one’s ending, not the deficiency of one’s beginning. That perfection is attained only through repentance and seeking forgiveness, and every servant must repent; it is obligatory for the first and the last of humankind, as the Exalted says: “so that Allah may punish the hypocrite men and women and the polytheist men and women, and that He may turn in mercy to the believing men and women; for Allah is ever All-Forgiving, Most Merciful.” (4)