He is confused about Yoosuf saying “Mention me to your master”
Question

                Does Allah punish his prophets? In the story of Yusuf (peace and blessings of Allah be upon him), was he left in prison for a number of years as a punishment from Allah because he asked one of his prison mates to mention him to his master, while only Allah should be called Master.
Praise be to Allah.
    Firstly:

    We have previously discussed the fact that the Prophets (may be the 
    blessings and peace of Allaah be upon them all) are infallible and protected 
    against major sins, bad attitudes and vile actions that are contrary to 
    chivalry.  

    See the answers to questions no. 
    7208 and 
    42216. 

    Secondly: 

    With regard to the story of Yoosuf, the more correct of the 
    two opinions in the commentary thereon is that the one who forgot to mention 
    him to his lord (master) in this verse was not Yoosuf (peace be upon him) 
    but the other prisoner, whom Yoosuf asked to mention him to his lord (master 
    or king).  Allaah says (interpretation of the meaning): 

    “And he said to the one whom he knew to be saved: “Mention 
    me to your lord (i.e. your king, so as to get me out of the prison).” But 
    Shaytaan (Satan) made him forget to mention it to his lord. So [Yoosuf 
    (Joseph)] stayed in prison a few (more) years”

    [Yoosuf 12:42]

    As the apparent meaning of the commentary on the verse is 
    that the one who forgot was the one who was supposed to convey the message 
    from Yoosuf to the ruler of Egypt, there is nothing in the content of this 
    message – to remind the ruler about Yoosuf – that undermines the position of 
    Prophethood or is contrary to the idea of putting one’s trust in Allaah and 
    referring one’s needs to Him. 

    Shaykh al-Islam Ibn Taymiyah said: Allaah said: “But 
    Shaytaan (Satan) made him forget to mention it to his lord”. It was said 
    that he caused Yoosuf to forget to remember his Lord, when he said, “Mention 
    me to your lord.” And it was said that the shaytaan caused the one who 
    was saved (from person) to forget to mention him to his lord. This is the 
    correct view, because it follows on from the words “Mention me to your 
    lord”. Allaah said: “But Shaytaan (Satan) made him forget to mention 
    it to his lord”. The pronoun refers to the nearest person if there is no 
    evidence to the contrary, and because Yoosuf would not forget to remember 
    his Lord, for he was always remembering his Lord. Before interpreting the 
    dream he had called them both [his two fellow prisoners] to believe in his 
    Lord, and said to them: 

    “O two companions of the prison! Are many different lords 
    (gods) better or Allaah, the One, the Irresistible?

    40. “You do not worship besides Him but only names which 
    you have named (forged) — you and your fathers — for which Allaah has sent 
    down no authority. The command (or the judgement) is for none but Allaah. He 
    has commanded that you worship none but Him (i.e. His Monotheism); that is 
    the (true) straight religion, but most men know not”

    [Yoosuf 12:39-40]

    And before that he had said to them:

    “No food will come to you (in wakefulness or in dream) as 
    your provision, but I will inform (in wakefulness) its interpretation before 
    it (the food) comes. This is of that which my Lord has taught me. Verily, I 
    have abandoned the religion of a people that believe not in Allaah and are 
    disbelievers in the Hereafter (i.e. the Kan‘aanyyoon of Egypt who were 
    polytheists and used to worship sun and other false deities).

    38. “And I have followed the religion of my fathers, — 
    Ibraaheem (Abraham), Ishaaq (Isaac) and Ya‘qoob (Jacob) [عليهم 
    السلام ], and never could we attribute any partners whatsoever to 
    Allaah. This is from the Grace of Allaah to us and to mankind, but most men 
    thank not (i.e. they neither believe in Allaah, nor worship Him)”

    [Yoosuf 12:37-38]

    Thus he mentioned his Lord, and this is what his Lord had 
    taught him, because he left the religion of mushrik people who did not 
    believe in Allaah even though they acknowledged the existence of a Creator, 
    and they did not believe in the Hereafter, and he followed the religion of 
    his forefathers, the leaders of the believers, whom Allaah has made leaders 
    calling people to Him – Ibraaheem, Ishaaq and Ya’qoob. He mentioned his 
    Lord, then he called them to believe in his Lord, then after that he 
    interpreted the dream and said: 

    “O two companions of the prison! As for one of you, he (as 
    a servant) will pour out wine for his lord (king or master) to drink” [v. 
    41]

    Then when he had finished interpreting the dream, “he said 
    to the one whom he knew to be saved: ‘Mention me to your lord (i.e. your 
    king’)”, so how could the shaytaan have caused Yoosuf to forget to 
    mention his Lord? 

    Rather the shaytaan caused the one who was saved (from 
    prison) to forget to mention Yoosuf to his lord (or master, the king).  

    Those who were of this opinion said: It would have been 
    better to put his trust in Allaah and not say, Mention me to your lord; when 
    he forgot to put his trust in his Lord, he was punished by staying a few 
    years more in prison. 

    It may be said that there is nothing in his saying “Mention 
    me to your lord” that is contrary to putting one’s trust in Allaah 
    (tawakkul), rather Yoosuf said: “The command (or the judgement) is for 
    none but Allaah” [v. 40], just as his father’s words, “Do not enter 
    by one gate, but enter by different gates” [v. 67], were not contrary to 
    putting one’s trust in Allaah, rather he said: “I cannot avail you 
    against Allaah at all. Verily, the decision rests only with Allaah. In Him, 
    I put my trust and let all those that trust, put their trust in Him” [v. 67]. 

    Moreover, Allaah has testified that Yoosuf is one of His 
    sincere slaves, and the sincere person cannot be sincere if he puts his 
    trust in anything other than Allaah, because that is shirk, and Yoosuf was 
    not a mushrik, either in worship or trust. Rather he put his trust in his 
    Lord with regard to his own actions, as he said: “Unless You turn away 
    their plot from me, I will feel inclined towards them and be one (of those 
    who commit sin and deserve blame or those who do deeds) of the ignorant” 
    [v. 33]. How could he not put his trust in Him with regard to the actions of 
    His slaves?  

    His saying “Mention me to your lord” is like his 
    saying to his master, “Set me over the store‑houses of the land; I will 
    indeed guard them with full knowledge” (as a minister of finance in Egypt)” 
    [v. 55]. When he asked to be appointed as governor for a religious purpose, 
    that was not contrary to putting one's trust in Allaah, and it was not the 
    kind of seeking high position that is forbidden. So how could his saying to 
    the boy, “Mention me to your lord” be contrary to putting one’s trust 
    in Allaah, when all it involved was telling the king about him so that he 
    would know about his situation and the truth would become clear, and Yoosuf 
    was one of the most steadfast of people. 

    Hence after this request – “And the king said: ‘Bring him 
    to me’” [v. 50] – was made, Yoosuf said: “Return to your lord and ask 
    him, ‘What happened to the women who cut their hands? Surely, my Lord 
    (Allaah) is Well‑Aware of their plot” [v. 50]. So here Yoosuf referred 
    to the “lord” (master) of that man, as he mentioned him before. And he said: 
    “Return to your lord and ask him, ‘What happened to the women…” In 
    saying “Mention me to your lord”, he did not fail to do something 
    that was obligatory and he did not do something that was haraam, such that 
    Allaah would punish him by leaving him in prison for a few more years. 

    What is meant is that Yoosuf did not commit a sin that was 
    referred to in the Qur’aan, and Allaah does not tell us of any sin that any 
    of the Prophets committed but He also tells us that he asked for forgiveness 
    for it. But Allaah does not tell us that Yoosuf asked for forgiveness for 
    these words. 

    End quote from Majmoo’ al-Fataawa (15/112-118). 

    Thirdly: 

    With regard to Yoosuf (peace be upon him) saying when he was 
    in prison, “Mention me to your lord”, this is not the lordship of 
    worship, rather it is the lordship of kingship and control. Al-Fayroozabaadi 
    said: The lord of anything is its owner or the one who is entitled to it or 
    to whom it belongs. But no one can be called the Lord in a general sense 
    except Allaah, may He be exalted, who is looking after all creatures. But 
    when it is mentioned in conjunction with something else in the possessive, 
    then it may be said of Allaah and of others, such as Rabb al-‘Aalameen (Lord 
    of the worlds), rabb al-daar (owner of the house). End quote. 

    Basaa’ir Dhuwi’l-Tamyeez 
    (3/29). 

    Al-Raaghib al-Asfahaani said: It may be said; rabb al-daar 
    (lit. lord of the house), rabb al-faras (lord of the horse) meaning the 
    owner thereof. It is on this basis that Allaah tells us that Yoosuf said “Mention 
    me to your lord”. End quote, 

    Al-Mufradaat fi Ghareeb al-Qur’aan 
    (186). 

    What al-Raaghib (may Allaah have mercy on him) meant was that 
    the usage of the word rabb (lord) in this verse is permissible, because lord 
    here refers to his master or ruler, not a lord in an absolute sense; that 
    may only be said of Allaah, may He be exalted. 

    But he may be confused and think that this is not allowed, as 
    in the hadeeth of Abu Hurayrah in which the Prophet  (peace and 
    blessings of Allaah be upon him) said: “None of you should say, Give food to 
    your lord (rabb), help your lord with wudoo’, give water to your lord. Let 
    him say sayyidi or mawlaaya (my master). And no one of you should say my 
    ‘abd or my amah (referring to his slave); let him say my fataa or my fataah, 
    or my ghulaam.” [Narrated by al-Bukhaari (2552) and Muslim (2249). 

    Al-Nawawi (may Allaah have mercy on him) said: The scholars 
    said: The word al-Rabb, with the definite article al-, cannot be applied to 
    anyone except Allaah, may He be glorified and exalted. But it may be used in 
    conjunction with something else, in the genitive, e.g., rabb al-maal (the 
    owner of the wealth), rabb al-daar (the owner of the house) and so on. An 
    example of this is what the Prophet  (peace and blessings of Allaah be 
    upon him) said, in the saheeh hadeeth about the lost camel, “Let it be until 
    its owner (rabbuha) finds it, and in another saheeh hadeeth, “until the one 
    who has wealth (rabb al-maal) will be worried about finding someone to 
    accept his wealth (zakaah).” (It also appears) in the words of ‘Umar (may 
    Allaah be pleased with him) in al-Saheeh, “… the owner (rabb) of the 
    herd of camels and flock of sheep…” And there are many other well-known 
    examples in the hadeeth.                                              
    

    The scholars said: It is only makrooh for a slave to say to 
    his master “rabbiy (my lord)” because by saying this he is making someone a 
    partner with Allaah in lordship. 

    With regard to the ahaadeeth “until its owner (rabbuha) finds 
    it” and “owner (rabb) of the herd of camels” and so on, the word is only 
    used here because it refers to things that are not accountable. They are 
    like houses and wealth. Undoubtedly it is not makrooh to say rabb al-daar 
    (owner of the house) or rabb al-maal (owner of the wealth). 

    With regard to the words of Yoosuf, “mention me to your 
    lord”, there are two answers: 

    1 – That he was addressing him in terms that he was 
    accustomed to; such usage is permissible in cases of necessity, as Moosa 
    (peace be upon him) said to al-Saamiri: “And look at your ilaah (god)” 
    [Ta-Ha 20:97], i.e., look at that which you have taken as a god. 

    2 – This was the law of those who came before us, and the law 
    of those who came before us is not a law for us if our law tells us 
    something different. There is no difference of scholarly opinion concerning 
    this point. 

    The scholars of usool only differed concerning the laws of 
    those who came before us if there is no narration stating that our law is 
    either in agreement with it or differs from it – is it a law that is 
    prescribed for us too, or not? End quote. 

    Al-Adhkaar by al-Nawawi 
    (1/363). 

    Al-Haafiz Ibn Hajar (may Allaah have mercy on him) said: The 
    reason for the prohibition is that that the right of Lordship belongs to 
    Allaah alone, because the lord is the owner, the one who is maintaining a 
    thing, and that is true only of Allaah, may He be exalted. 

    Al-Khattaabi said: The reason why it is not allowed to call 
    another person one’s rabb (lord) is that man is under the care of al-Rabb 
    (the Lord, Allaah), and he is required to show sincere belief in the Oneness 
    of Allaah (Tawheed) and avoid associating anything with Him (shirk), so it 
    is makrooh for him to use the same name lest it come under the heading of 
    shirk. There is no differentiation in this case between the free man and the 
    slave. As for other things, animals and inanimate objects, which are not 
    obliged to do acts of worship, it is not makrooh to use this word in the 
    genitive with reference to them, such as saying rabb al-daar (owner of the 
    house) or rabb al-thawr (owner of the bull). 

    Ibn Battaal said: It is not permissible to call anyone except 
    Allaah rabb (lord), just as it is not permissible to call anyone else ilaah 
    (god). What is to be used exclusively for Allaah is the word al-Rabb (the 
    Lord) with the definite article, without mentioning anything in conjunction 
    with it. But when it is used in conjunction with another word, in the 
    genitive, it is it permissible to use it, such as when Allaah tells us that 
    Yoosuf (peace be upon him) said: “Mention me to your Lord” and he 
    said: “Return to your lord” [Yoosuf 12:50], and when the Prophet  
    (peace and blessings of Allaah be upon him) said, describing the portents of 
    the Hour, “When the slave woman gives birth to her lord (i.e., master, 
    rabbaha).” This indicates that the prohibition on using this word 
    applies only to its use with the definite article (al-Rabb), and it is 
    possible that the prohibition is aimed at avoiding usage with reference to 
    human beings of words that are befitting only for Allaah. Reports which 
    indicate otherwise may be taken as meaning that it is permitted. Or it may 
    be that it is not allowed to do that a great deal and take that usage as a 
    habit, and it does not mean that it is forbidden in all cases. End quote. 

    Fath al-Baari (5/179). 

    To sum up: 

    The word al-Rabb (the Lord) which applies only to Allaah is 
    that which appears with the definite article, but when the word is used in 
    conjunction with something else, especially if it is something that has no 
    power of rational thought and is not obliged to worship Allaah, then it is 
    permissible. That includes this verse. 

    It may also be said that the interpretation is that he was 
    addressing them in their language that they knew, or that this was 
    permissible for them. 

    And Allaah knows best.