(19) بَابُ قَوْلِ اللَّهِ تَعَالَى: {لَقَدْ كَانَ فِي يُوسُفَ وَإِخْوَتِهِ آيَاتٌ لِلسَّائِلِينَ}
Narrated Abu Huraira:
Allah's Messenger (ﷺ) said, "May Allah bestow His Mercy on Lot. He wanted to have a powerful support. If I were to stay in prison (for a period equal to) the stay of Joseph (prison) and then the offer of freedom came to me, then I would have accepted it." (See Hadith No. 591)
Reference: Sahih al-Bukhari 3387
In-book reference: Book 60, Hadith 61
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 4, Book 55, Hadith 601