Sahih al-Bukhari 3372
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
نَحْنُ أَحَقُّ مِنْ إِبْرَاهِيمَ إِذْ قَالَ {رَبِّ أَرِنِي كَيْفَ تُحْيِي الْمَوْتَى قَالَ أَوَلَمْ تُؤْمِنْ قَالَ بَلَى وَلَكِنْ لِيَطْمَئِنَّ قَلْبِي} وَيَرْحَمُ اللَّهُ لُوطًا، لَقَدْ كَانَ يَأْوِي إِلَى رُكْنٍ شَدِيدٍ وَلَوْ لَبِثْتُ فِي السِّجْنِ طُولَ مَا لَبِثَ يُوسُفُ لأَجَبْتُ الدَّاعِيَ "
Narrated Abu Huraira:
Allah's Messenger (ﷺ) said, "We are more liable to be in doubt than Abraham when he said, 'My Lord! Show me how You give life to the dead." . He (i.e. Allah) slid: 'Don't you believe then?' He (i.e. Abraham) said: "Yes, but (I ask) in order to be stronger in Faith." (2:260) And may Allah send His Mercy on Lot! He wished to have a powerful support. If I were to stay in prison for such a long time as Joseph did I would have accepted the offer (of freedom without insisting on having my guiltless less declared).
Full reference and source
Sahih al-Bukhari 3372 In-book : Book 60, Hadith 51 USC-MSA web (English) : Vol. 4, Book 55, Hadith 591 (deprecated)
View source on Sunnah.com (opens in a new tab)