It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: Whoever obeys me has indeed obeyed Allah, and whoever obeys the leader has obeyed me, and whoever disobeys me has disobeyed Allah, and whoever disobeys the leader has disobeyed Allah.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 10089