A general rule of Islam implies that there is no obedience to any creature when it involves disobedience (or sinning) to Allah, the Exalted. Obedience to others other than Allah is only allowed in matters of one’s likes and dislikes. The Messenger of Allah (sallallahu alaihi wa-sallam) said: “He who complies with the command of a master, a leader or a ruler in disobedience and defiance of Allah is an unbeliever and a Mushrik (he who associates partners with Allah). There shall be no obedience to a creature of Allah when it would involve disobeying or displeasing Allah.” [Saheeh Muslim, Book Imarah, p.1469]

He (sallallahu alaihi wa-sallam) also said: “Obedience is only in what is good.” [Saheeh al-Bukharee (Eng. trans. 9/193/259) and Saheeh Muslim (Eng. trans. 3 / 1022/no.4535)

And: “Hearing and obeying is (binding) upon the Muslim in what he likes or dislikes, so long as he is not ordered to sin. If he is ordered with sin, then there is no hearing and no obeying.” [Agreed upon]

Similarly, obedience to parents is only obligatory in matters that are permitted by Allah, the Exalted, and as Allah says: But if they (both) strive with you to make you join in worship with Me others that of which you have no knowledge, then obey them not, but behave with them in the world kindly, and follow the path of him who turns to Me in repentance and in obedience. Then to Me will be your return, and I shall tell you what you used to do. (31:15)

Imam Ibn Katheer (may Allah have mercy upon him) writes in the Tafseer of the above verse: “means, if they try hard to make you follow them in their (false) religion, then do not accept that from them, but do not let that stop you from behaving towards them with respect.”

Allah also said in Soorah Al-Ankabut, “And We have enjoined on man to be good and dutiful to his parents, but if they strive to make you join with Me (in worship) anything (as a partner) of which you have no knowledge, then obey them not. Unto Me is your return, and I shall tell you what you used to do.” (29: 8)

An excellent example of the above (first) verse is found in the narration of Sa’d Ibn Malik, who said: “This verse (31:15) was revealed concerning me. I was a man who honored his mother, but when I became a Muslim, she said: ‘O Sa’d! What is this new thing I see you doing? Leave this religion of yours, or I will not eat or drink until I die, and people will say: ‘Shame on you, for what you have done to me and they will say that you have killed your mother.’ I said, ‘Do not do that, O mother, for I will not give up this religion of mine for anything.’ She stayed without eating for one day and one night, and she became exhausted; then she stayed for another day and night without eating, and she became utterly exhausted. When I saw that, I said: ‘O mother, by Allah, even if you had one hundred souls and they were to depart one by one, I would not give up this religion of mine for anything, so if you want to, eat, and if you want to, do not eat.’ So she ate.” [Mentioned by Ibn Al-Athir in Usd al-Ghabah 2: 216]

Shaikh al-Islam Ibn Taymiyyah said: “Abu Bakr said in his book, Zad-ul-Musafir, ‘Whosoever made his parents angry and brought tears to them is required to go back and make them laugh.’ This indicates that it is necessary to obey parents with regards to permissible things and whatever they command should be avoided, if all this brings their benefit and does not harm their child, including ending travel plans and staying with them if they wished that.’