The Prophet (peace and blessings be upon him) said:
"Indeed, Allah Almighty accepts the repentance of a servant as long as the throes of death have not come upon him (that is, as long as the soul has not reached the throat)."
Hadith Referenceصحیح الجامع الصغیر / حرف الألف / 1903
Hadith Gradingالألبانی:حسن
Hadith Takhrij[حم ت هـ حب ك هب] عن ابن عمر. المشكاة ٢٣٤٣ و ٢٤٤٩.