كتاب الجهاد والسير
32  
The Book of Jihad and Expeditions
(22)
Chapter: Permissibility of fighting those who break a treaty; Permissibility of letting besieged people surrender, subject to the judgement of a just person who is qualified to pass judgement
(22)
باب جَوَازِ قِتَالِ مَنْ نَقَضَ الْعَهْدَ وَجَوَازِ إِنْزَالِ أَهْلِ الْحِصْنِ عَلَى حُكْمِ حَاكِمٍ عَدْلٍ أَهْلٍ لِلْحُكْمِ
Sahih Muslim 1769 a

It has been narrated on the authority of A'isha who said:

Sa'd was wounded on the day of the Battle of the Ditch. A man from the Quraish called Ibn al-Ariqah shot at him an arrow which pierced the artery in the middle of his forearm. The Messenger of Allah (ﷺ) pitched a tent for him in the mosque and would inquire after him being in close proximity. When he returned from the Ditch and laid down his arms and took a bath, the angel Gabriel appeared to him and he was removing dust from his hair (as if he had just returned from the battle). The latter said: You have laid down arms. By God, we haven't (yet) laid them down. So march against them. The Messenger of Allah (ﷺ) asked: Where? He pointed to Banu Quraiza. So the Messenger of Allah (may peace he upon him) fought against them. They surrendered at the command of the Messenger of Allah (ﷺ), but he referred the decision about them to Sa'd who said: I decide about them that those of them who can fight be killed, their women and children taken prisoners and their properties distributed (among the Muslims).
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَمُحَمَّدُ بْنُ الْعَلاَءِ الْهَمْدَانِيُّ، كِلاَهُمَا عَنِ ابْنِ نُمَيْرٍ، قَالَ ابْنُ الْعَلاَءِ حَدَّثَنَا ابْنُ نُمَيْرٍ، حَدَّثَنَا هِشَامٌ، عَنْ أَبِيهِ، عَنْ عَائِشَةَ، قَالَتْ أُصِيبَ سَعْدٌ يَوْمَ الْخَنْدَقِ رَمَاهُ رَجُلٌ مِنْ قُرَيْشٍ يُقَالُ لَهُ ابْنُ الْعَرِقَةِ ‏.‏ رَمَاهُ فِي الأَكْحَلِ فَضَرَبَ عَلَيْهِ رَسُولُ اللَّهِ صلى الله عليه وسلم خَيْمَةً فِي الْمَسْجِدِ يَعُودُهُ مِنْ قَرِيبٍ فَلَمَّا رَجَعَ رَسُولُ اللَّهِ صلى الله عليه وسلم مِنَ الْخَنْدَقِ وَضَعَ السِّلاَحَ فَاغْتَسَلَ فَأَتَاهُ جِبْرِيلُ وَهُوَ يَنْفُضُ رَأْسَهُ مِنَ الْغُبَارِ فَقَالَ وَضَعْتَ السِّلاَحَ وَاللَّهِ مَا وَضَعْنَاهُ اخْرُجْ إِلَيْهِمْ ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ فَأَيْنَ ‏"‏ ‏.‏ فَأَشَارَ إِلَى بَنِي قُرَيْظَةَ فَقَاتَلَهُمْ رَسُولُ اللَّهِ صلى الله عليه وسلم فَنَزَلُوا عَلَى حُكْمِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَرَدَّ رَسُولُ اللَّهِ صلى الله عليه وسلم الْحُكْمَ فِيهِمْ إِلَى سَعْدٍ قَالَ فَإِنِّي أَحْكُمُ فِيهِمْ أَنْ تُقْتَلَ الْمُقَاتِلَةُ وَأَنْ تُسْبَى الذُّرِّيَّةُ وَالنِّسَاءُ وَتُقْسَمَ أَمْوَالُهُمْ ‏.‏
Reference : Sahih Muslim 1769a
In-book reference : Book 32, Hadith 79
USC-MSA web (English) reference : Book 19, Hadith 4370
  (deprecated numbering scheme)