He said to the one whom he thought would be saved of them: "Mention me to your lord." But the devil made him forget to mention to his lord, so He remained in prison for a few years.
Translation endnotes
[12:42] The ending of the verse could also be understood as, "When Perverse made him (Joseph) to forget remember his Lord (God), he remained in prison a few more years." Both meanings might be intended at the same time: When asking his friend to remind the King about him, Joseph forgot to remember his Lord (God), and his friend, in turn, forgot to mention him to the king whom he falsely considered "his lord." Verses 12:39-40 and 12:50 clearly indicate that Joseph was a monotheist, and would never call anyone other than God as his lord. The Quran reminds us that only God can save us from difficulties. Those who acknowledge the truth, trust God (1:5; 6:17; 8:17; 10:107; 26:77-80).