Sahih Bukhari | Volume 9 | Hadith Number 251

Narrated by Abu Huraira
Allah's Apostle said, "Whoever obeys me, obeys Allah, and whoever disobeys me, disobeys Allah, and whoever obeys the ruler I appoint, obeys me, and whoever disobeys him, disobeys me."