“O you who have believed, obey Allah, obey the Messenger, and those in authority among you. If you dispute about anything, refer it to Allah and the Messenger—if you truly believe in Allah and the Last Day. That is best and most fitting for resolution.” ⦗1⦘
Thus Allah commanded the believers to obey Him, His Messenger, and those who hold authority over them, just as He commanded them to render trusts to their rightful owners and, when they judge between people, to judge with justice. He also instructed them that whenever they differ over a matter, they must refer it back to Allah and the Messenger.
The scholars have said: referring back to Allah means referring to His Book, and referring back to the Messenger after his death means referring to his sunnah. Allah the Exalted says: “Mankind were once a single community; then Allah sent prophets as bearers of glad tidings and warners, and with them He sent down the Scripture in truth so it might judge between people concerning that over which they differed. None differed over it except those who had been given it, after clear proofs had come to them, out of transgression among themselves. Then, by His leave, Allah guided those who believed to the truth regarding that over which they had differed, and Allah guides whom He wills.”