Suuratun – Nisai’ Verse 59.
يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓا۟ أَطِيعُوا۟ ٱللَّـهَ وَأَطِيعُوا۟ ٱلرَّسُولَ وَأُو۟لِى ٱلْأَمْرِ مِنكُمْ ۖ
فَإِن تَنَـٰزَعْتُمْ فِى شَىْءٍ فَرُدُّوهُ إِلَى ٱللَّـهِ وَٱلرَّسُولِ إِن كُنتُمْ تُؤْمِنُونَ بِٱللَّـهِ وَٱلْيَوْمِ ٱلْـَٔاخِرِ ۚ ذَٰلِكَ خَيْرٌ وَأَحْسَنُ تَأْوِيلًا ﴿٥٩
59. O you who believe! Obey Allaah and obey the Messenger, and those of you (Muslims) who are in authority. (And) if you differ in anything amongst yourselves, refer it to Allaah and His Messenger, if you believe in Allaah and in the Last Day. That is better and more suitable for final determination.
Tafsir Ibn Kathir
In the Two Sahihs, it is recorded that Abu Hurayrah said that the Messenger of Allaah said,
«مَنْ أَطَاعَنِي فَقَدْ أَطَاعَ اللهَ، وَمَنْ عَصَانِي فَقَدْ عَصَى اللهَ، وَمَنْ أَطَاعَ أَمِيرِي فَقَدْ أَطَاعَنِي، وَمَنْ عَصَى أَمِيرِي فَقَدْ عَصَانِي»
(Whoever obeys me, obeys Allaah, and whoever disobeys me, disobeys Allaah. Whoever obeys my commander, obeys me, and whoever disobeys my commander, disobeys me.) This is why Allaah said,
أَطِيعُواْ اللَّهَ
(Obey Allaah), adhere to His Book,
وَأَطِيعُواْ الرَّسُولَ
(and obey the Messenger), adhere to his Sunnah,
وَأُوْلِى الاٌّمْرِ مِنْكُمْ
(And those of you who are in authority) in the obedience to Allaah which they command you, not what constitutes disobedience of Allaah, for there is no obedience to anyone in disobedience to Allaah, as we mentioned in the authentic Hadith,
«إِنَّمَا الطَّاعَةُ فِي الْمَعْرُوف»
(Obedience is only in righteousness.)