Allah, the Exalted, said: "And whatever the Messenger gives you, take it, and whatever he forbids you, abstain from it." [Hashr: 7],
And the Exalted said: "He does not speak from [his own] inclination. It is not but a revelation revealed." [Najm: 3-4],
And the Exalted said: "Say, [O Muhammad], 'If you should love Allah, then follow me, [so] Allah will love you and forgive you your sins.'" [Al Imran: 31],
And the Exalted said: "There has certainly been for you in the Messenger of Allah an excellent pattern for anyone whose hope is in Allah and the Last Day." [Ahzab: 21],
And the Exalted said: "But no, by your Lord, they will not [truly] believe until they make you, [O Muhammad], judge concerning that over which they dispute among themselves and then find within themselves no discomfort from what you have judged and submit in [full, willing] submission." [Nisa: 65],
And the Exalted said: "And if you disagree over anything, refer it to Allah and the Messenger." [Nisa: 59] The scholars have interpreted this to mean referring to the Quran and the Sunnah,
And the Exalted said: "He who obeys the Messenger has obeyed Allah." [Nisa: 80],
And the Exalted said: "And indeed, you guide to a straight path - the path of Allah." [Shura: 52-53],
And the Exalted said: "So let those beware who dissent from his order, lest fitnah strike them or a painful punishment." [Nur: 63],
And the Exalted said: "And remember what is recited in your houses of the verses of Allah and wisdom." [Ahzab: 34],
And there are many verses on this topic and as of the ahadith: