Language:
كتاب الجهاد والسير
56  
Fighting for the Cause of Allah (Jihaad)
(108)
Chapter: Listening to and obeying the Imam
(108)
باب السَّمْعِ وَالطَّاعَةِ لِلإِمَامِ
Sahih al-Bukhari 2955

Narrated Ibn `Umar:

The 'Prophet said, "It is obligatory for one to listen to and obey (the ruler's orders) unless these orders involve one disobedience (to Allah); but if an act of disobedience (to Allah) is imposed, he should not listen to or obey it."

حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنْ عُبَيْدِ اللَّهِ، قَالَ حَدَّثَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ عَنِ النَّبِيِّ صلى الله عليه وسلم‏.‏ وَحَدَّثَنِي مُحَمَّدُ بْنُ صَبَّاحٍ، حَدَّثَنَا إِسْمَاعِيلُ بْنُ زَكَرِيَّاءَ، عَنْ عُبَيْدِ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ السَّمْعُ وَالطَّاعَةُ حَقٌّ، مَا لَمْ يُؤْمَرْ بِالْمَعْصِيَةِ، فَإِذَا أُمِرَ بِمَعْصِيَةٍ فَلاَ سَمْعَ وَلاَ طَاعَةَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 2955
In-book reference : Book 56, Hadith 167
USC-MSA web (English) reference : Vol. 4, Book 52, Hadith 203
  (deprecated numbering scheme)
(109)
Chapter: The Imam should be defended
(109)
باب يُقَاتَلُ مِنْ وَرَاءِ الإِمَامِ وَيُتَّقَى بِهِ
Sahih al-Bukhari 2956, 2957

Narrated Abu Huraira:

That heard Allah's Messenger (ﷺ) saying, "We are the last but will be the foremost to enter Paradise)." The Prophet added, "He who obeys me, obeys Allah, and he who disobeys me, disobeys Allah. He who obeys the chief, obeys me, and he who disobeys the chief, disobeys me. The Imam is like a shelter for whose safety the Muslims should fight and where they should seek protection. If the Imam orders people with righteousness and rules justly, then he will be rewarded for that, and if he does the opposite, he will be responsible for that."

حَدَّثَنَا أَبُو الْيَمَانِ، أَخْبَرَنَا شُعَيْبٌ، حَدَّثَنَا أَبُو الزِّنَادِ، أَنَّ الأَعْرَجَ، حَدَّثَهُ أَنَّهُ، سَمِعَ أَبَا هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّهُ سَمِعَ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏"‏ نَحْنُ الآخِرُونَ السَّابِقُونَ ‏"‏‏.‏ وَبِهَذَا الإِسْنَادِ ‏"‏ مَنْ أَطَاعَنِي فَقَدْ أَطَاعَ اللَّهَ، وَمَنْ عَصَانِي فَقَدْ عَصَى اللَّهَ، وَمَنْ يُطِعِ الأَمِيرَ فَقَدْ أَطَاعَنِي، وَمَنْ يَعْصِ الأَمِيرَ فَقَدْ عَصَانِي، وَإِنَّمَا الإِمَامُ جُنَّةٌ يُقَاتَلُ مِنْ وَرَائِهِ وَيُتَّقَى بِهِ، فَإِنْ أَمَرَ بِتَقْوَى اللَّهِ وَعَدَلَ، فَإِنَّ لَهُ بِذَلِكَ أَجْرًا، وَإِنْ قَالَ بِغَيْرِهِ، فَإِنَّ عَلَيْهِ مِنْهُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 2956, 2957
In-book reference : Book 56, Hadith 168
USC-MSA web (English) reference : Vol. 4, Book 52, Hadith 204
  (deprecated numbering scheme)