Ghafir 40:34
وَلَقَدْ جَآءَكُمْ يُوسُفُ مِن قَبْلُ بِٱلْبَيِّنَـٰتِ فَمَا زِلْتُمْ فِى شَكٍّ مِّمَّا جَآءَكُم بِهِۦ ۖ حَتَّىٰٓ إِذَا هَلَكَ قُلْتُمْ لَن يَبْعَثَ ٱللَّهُ مِنۢ بَعْدِهِۦ رَسُولًا ۚ كَذَٰلِكَ يُضِلُّ ٱللَّهُ مَنْ هُوَ مُسْرِفٌ مُّرْتَابٌ
Walaqad jaakum yoosufu min qablu bilbayyinatifama ziltum fee shakkin mimma jaakum bihi hattaitha halaka qultum lan yabAAatha Allahu minbaAAdihi rasoolan kathalika yudillu Allahuman huwa musrifun murtab
And Joseph had already come to you before with clear proofs, but you remained in doubt of that which he brought to you, until when he died, you said, 'Never will Allāh send a messenger after him.' Thus does Allāh leave astray he who is a transgressor and skeptic."
And Yūsuf had already come to you earlier with clear signs, but you remained in suspicion about what he brought to you - until when he died, you said, ‘Allah will never send a messenger after him.’ That is how Allah lets go astray anyone who crosses limits and lives in doubt, -