In one of his celebrated writings, the great scholar ibn al-Qayyim wrote:
فصل توبة العبد بين توبتين من ربه
A Servant’s Tawbah Lies Between Two Tawbahs from His Lord
وتوبة العبد إلى الله محفوفة بتوبة من الله عليه قبلها ، وتوبة منه بعدها ، فتوبته بين توبتين من ربه ، سابقة ولاحقة ، فإنه تاب عليه أولا إذنا وتوفيقا وإلهاما ، فتاب العبد ، فتاب الله عليه ثانيا ، قبولا وإثابة ، قال الله سبحانه وتعالى لقد تاب الله على النبي والمهاجرين والأنصار الذين اتبعوه في ساعة العسرة من بعد ما كاد يزيغ قلوب فريق منهم ثم تاب عليهم إنه بهم رءوف رحيم وعلى الثلاثة الذين خلفوا حتى إذا ضاقت عليهم الأرض بما رحبت وضاقت عليهم أنفسهم وظنوا أن لا ملجأ من الله إلا إليه ثم تاب عليهم ليتوبوا إن الله هو التواب الرحيم فأخبر سبحانه أن توبته عليهم سبقت توبتهم ، وأنها هي التي جعلتهم تائبين ، فكانت سببا مقتضيا لتوبتهم ، فدل على أنهم ما تابوا حتى تاب الله تعالى عليهم ، والحكم ينتفي لانتفاء علته . ـ
A servant’s tawbah is surrounded by tawbah from Allah towards him beforehand and tawbah from Him afterwards, such that his tawbah lies between two tawbahs from his Lord – one before and one after. For Allah turns to Him firstly by permitting, enabling and inspiring him to repent. Then the servant repents, so Allah turns to Him in forgiveness a second time by accepting his repentance and rewarding him for it.
Allah said:
لَّقَد تَّابَ اللَّهُ عَلَى النَّبِيِّ وَالْمُهَاجِرِينَ وَالْأَنصَارِ الَّذِينَ اتَّبَعُوهُ فِي سَاعَةِ الْعُسْرَةِ مِن بَعْدِ مَا كَادَ يَزِيغُ قُلُوبُ فَرِيقٍ مِّنْهُمْ ثُمَّ تَابَ عَلَيْهِمْ ۚ إِنَّهُ بِهِمْ رَءُوفٌ رَّحِيمٌ * وَعَلَى الثَّلَاثَةِ الَّذِينَ خُلِّفُوا حَتَّىٰ إِذَا ضَاقَتْ عَلَيْهِمُ الْأَرْضُ بِمَا رَحُبَتْ وَضَاقَتْ عَلَيْهِمْ أَنفُسُهُمْ وَظَنُّوا أَن لَّا مَلْجَأَ مِنَ اللَّهِ إِلَّا إِلَيْهِ ثُمَّ تَابَ عَلَيْهِمْ لِيَتُوبُوا ۚ إِنَّ اللَّهَ هُوَ التَّوَّابُ الرَّحِيمُ
Allah has certainly turned to the Prophet, the Muhajiroon and the Ansar who followed him during the hour of difficulty after the hearts of a group of them had almost gone astray, and then He turned to them [in forgiveness]. He is certainly Kind, Merciful. * And [He also turned in forgiveness] to three of those who were left behind to the point that the earth closed in on them in spite of its vastness and their souls became tightened and they were certain that there is no refuge from Allah except in Him. Then He turned to them so they could repent. Allah is Accepting of Repentance, Merciful. [9:117-118]