Jami` at-Tirmidhi, Book 47, Hadith 3404 (In-Book)

Narrated Abu Hurairah: that the Messenger of Allah said: "Indeed, the honorable, the son of the honorable, the son of the honorable, the son of the honorable: Yusuf bin Ya'qub bin Ishaq bin Ibrahim." He said: "And if I were to have remained in the prison as long as Yusuf, then the messenger came, I would have accepted." Then he recited: When the messenger came to him, he said: "Return to your king and ask him: 'What happened to the women who cut their hands? (12:50)' He said: "May Allah have mercy upon Lut, certainly he used to lean toward powerful support, since he said: "Would that I had strength to overpower you, or that I could betake myself to some powerful support (11:80)." So Allah did not send a Prophet after him except among a high ranking family (Dhirwah) among his people."

حَدَّثَنَا الْحُسَيْنُ بْنُ حُرَيْثٍ الْخُزَاعِيُّ الْمَرْوَزِيُّ، حَدَّثَنَا الْفَضْلُ بْنُ مُوسَى، عَنْ مُحَمَّدِ بْنِ عَمْرٍو، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّ الْكَرِيمَ بْنَ الْكَرِيمِ بْنِ الْكَرِيمِ بْنِ الْكَرِيمِ يُوسُفُ بْنُ يَعْقُوبَ بْنِ إِسْحَاقَ بْنِ إِبْرَاهِيمَ قَالَ وَلَوْ لَبِثْتُ فِي السِّجْنِ مَا لَبِثَ ثُمَّ جَاءَنِي الرَّسُولُ أَجَبْتُ ‏.‏ ثُمَّ قَرَأََ ‏:‏ ‏(‏ فَلَمَّا جَاءَهُ الرَّسُولُ قَالَ ارْجِعْ إِلَى رَبِّكَ فَاسْأَلْهُ مَا بَالُ النِّسْوَةِ اللاَّتِي قَطَّعْنَ أَيْدِيَهُنَّ ‏)‏ قَالَ ‏:‏ وَرَحْمَةُ اللَّهِ عَلَى لُوطٍ إِنْ كَانَ لَيَأْوِي إِلَى رُكْنٍ شَدِيدٍ إِذْ قَالَ ‏:‏ ‏(‏ لَوْ أَنَّ لِي بِكُمْ قُوَّةً أَوْ آوِي إِلَى رُكْنٍ شَدِيدٍ ‏)‏ فَمَا بَعَثَ اللَّهُ مِنْ بَعْدِهِ نَبِيًّا إِلاَّ فِي ذِرْوَةٍ مِنْ قَوْمِهِ ‏"‏ ‏.‏

sunnah.com