Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:9:118

And ˹He also forgave˺ the three who were left behind ˹and regretted their error˺ to the point that the earth closed in on them in spite of its vastness and their souls confined them and they were certain that there is no refuge from Allah except in Him. Then He turned to them so they could repent. Indeed, Allah is the Accepting of repentance, the Merciful.  

And, He relented, to the three who were left behind, ˹formerly denied˺ His relenting to them, for the same reason ˹as those mentioned above˺, when the earth was straitened for them, for all its breadth, that is, despite its vastness, so they could find no place wherein to feel secure, and their souls, that is, their hearts, were straitened for them, because of the anxiety and their ˹sense of˺ alienation resulting from the delay of God’s relenting to them ˹with mercy˺, such that they ˹their souls˺ could not find happiness or solace; until they thought, they were certain, that (read the softened an) there is no refuge from God except in Him. Then He turned ˹relenting˺ to them, He made them successful in finding repentance, that they might also turn ˹in repentance˺. Truly God is the Relenting, the Merciful.
القرآن:٩:١١٨

وَعَلَى الثَّلَاثَةِ الَّذِينَ خُلِّفُوا حَتَّىٰ إِذَا ضَاقَتْ عَلَيْهِمُ الْأَرْضُ بِمَا رَحُبَتْ وَضَاقَتْ عَلَيْهِمْ أَنْفُسُهُمْ وَظَنُّوا أَنْ لَا مَلْجَأَ مِنَ اللَّهِ إِلَّا إِلَيْهِ ثُمَّ تَابَ عَلَيْهِمْ لِيَتُوبُوا ۚ إِنَّ اللَّهَ هُوَ التَّوَّابُ الرَّحِيمُ  

{و} تاب {على الثلاثة الذين خُلِّفوا} عن التوبة عليهم بقرينة {حتى إذا ضاقت عليهم الأرض بما رحُبت} أي مع رحبها، أي سعتها فلا يجدون مكانا يطمئنون إليه {وضاقت عليهم أنفسهم} قلوبهم للغمِّ والوحشة بتأخير توبتهم فلا يسعها سرور ولا أنس {وظنُّوا} أيقنوا {أن} مخففة {لا ملجأ من الله إلاّ إليه ثم تاب عليهم} وفقهم للتوبة {ليتوبوا إن الله هو التواب الرحيم}.