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:12:110

˹They continued˺ until, when the messengers despaired and were certain that they had been denied, there came to them Our victory, and whoever We willed was saved. And Our punishment cannot be repelled from the people who are criminals.  

Until (hattā indicates the end ˹result˺ indicated by ˹the previous statement˺ wa-mā arsalnā min qablika illā rijālan, And We did not send before you ˹any messengers˺ save men ˹above, Q. 12:109˺), that is, ˹to whom˺ Our support waned until, when the messengers despaired and thought, ˹when˺ the messengers were certain, that they were denied (read kudhdhibū, to mean ˹that they were denied˺ to such an extent that ˹they believed that˺ there would not be any ˹possible acceptance of˺ faith thereafter; or read kudhibū, to mean that the communities thought that their messengers had been lied to concerning the victory which they had been promised), Our help came to them and whomever We willed We delivered (read fa-nunajjī or fa-nunjī; or fa-nujjiya, as past tense, ‘˹whomever We wished˺ was delivered’). And Our wrath, Our chastisement, cannot be averted from the sinning, the idolatrous, folk.
القرآن:١٢:١١٠

حَتَّىٰ إِذَا اسْتَيْأَسَ الرُّسُلُ وَظَنُّوا أَنَّهُمْ قَدْ كُذِبُوا جَاءَهُمْ نَصْرُنَا فَنُجِّيَ مَنْ نَشَاءُ ۖ وَلَا يُرَدُّ بَأْسُنَا عَنِ الْقَوْمِ الْمُجْرِمِينَ  

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