Sunan Ibn Majah, Volume 5, Book 37, Hadith 4253 (DarusSalam)

It was narrated from ‘Abdullah bin ‘Amr that the Prophet said: “Allah accepts the repentance of His slave so long as the death rattle has not yet reached his throat.”

حَدَّثَنَا رَاشِدُ بْنُ سَعِيدٍ الرَّمْلِيُّ، أَنْبَأَنَا الْوَلِيدُ بْنُ مُسْلِمٍ، عَنِ ابْنِ ثَوْبَانَ، عَنْ أَبِيهِ، عَنْ مَكْحُولٍ، عَنْ جُبَيْرِ بْنِ نُفَيْرٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ قَالَ ‏:‏ ‏ "‏ إِنَّ اللَّهَ عَزَّ وَجَلَّ لَيَقْبَلُ تَوْبَةَ الْعَبْدِ مَا لَمْ يُغَرْغِرْ ‏" ‏ ‏.‏

sunnah.com