Sahih al-Bukhari, Hadith 2493 ⓘ
Narrated An-Nu`man bin Bashir: The Prophet said, "The example of the person abiding by Allah's order and restrictions in comparison to those who violate them is like the example of those persons who drew lots for their seats in a boat. Some of them got seats in the upper part, and the others in the lower. When the latter needed water, they had to go up to bring water (and that troubled the others), so they said, 'Let us make a hole in our share of the ship (and get water) saving those who are above us from troubling them. So, if the people in the upper part left the others do what they had suggested, all the people of the ship would be destroyed, but if they prevented them, both parties would be safe."
حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا زَكَرِيَّاءُ، قَالَ سَمِعْتُ عَامِرًا، يَقُولُ سَمِعْتُ النُّعْمَانَ بْنَ بَشِيرٍ ـ رضى الله عنهما ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " مَثَلُ الْقَائِمِ عَلَى حُدُودِ اللَّهِ وَالْوَاقِعِ فِيهَا كَمَثَلِ قَوْمٍ اسْتَهَمُوا عَلَى سَفِينَةٍ، فَأَصَابَ بَعْضُهُمْ أَعْلاَهَا وَبَعْضُهُمْ أَسْفَلَهَا، فَكَانَ الَّذِينَ فِي أَسْفَلِهَا إِذَا اسْتَقَوْا مِنَ الْمَاءِ مَرُّوا عَلَى مَنْ فَوْقَهُمْ فَقَالُوا لَوْ أَنَّا خَرَقْنَا فِي نَصِيبِنَا خَرْقًا، وَلَمْ نُؤْذِ مَنْ فَوْقَنَا. فَإِنْ يَتْرُكُوهُمْ وَمَا أَرَادُوا هَلَكُوا جَمِيعًا، وَإِنْ أَخَذُوا عَلَى أَيْدِيهِمْ نَجَوْا وَنَجَوْا جَمِيعًا " .
also referenced under: Book 47, Hadith 11 (In-Book) & Volume 3, Book 44, Hadith 673 (USC-MSA)