Yusuf - 12:110

حَتَّى إِذَا اسْتَيْأَسَ الرُّسُلُ وَظَنُّواْ أَنَّهُمْ قَدْ كُذِبُواْ جَاءهُمْ نَصْرُنَا فَنُجِّيَ مَن نَّشَاء وَلاَ يُرَدُّ بَأْسُنَا عَنِ الْقَوْمِ الْمُجْرِمِينَ
[12:110]
Until when the messengers despaired and the people became sure that they were indeed told a lie, Our help came to them and whom We pleased was delivered; and Our punishment is not averted from the guilty people.
(Respite will be granted) until, when the messengers give up hope (of their people) and (come to) think that they were treated as liars, there reaches them Our help, and those whom We will are delivered into safety. But never will be warded off our punishment from those who are in sin.
Till, when the messengers despaired and thought that they were denied, then came unto them Our help, and whom We would was saved. And Our wrath cannot be warded from the guilty.