Muhammad and his men - as per the Islamic scripture - mass murdered all male members of a surrendered Jewish tribe Banu Quraiza who reached puberty, and enslaved their women and children. This is shortly referenced in the Quran and explained clearly in the authentic hadiths, tafsirs and the earliest biographies of Muhammad by none other than Muslims.
Quran 33:26 - And those of the people of the Scripture who backed them (the disbelievers) Allah brought them down from their forts and cast terror into their hearts, (so that) a group (of them) you killed, and a group (of them) you made captives.
Tafsir Ibn Kathir on Quran 33:26 - The Campaign against Banu Qurayzah - Then the Messenger of Allah commanded that ditches should be dug, so they were dug in the earth, and they were brought tied by their shoulders, and were beheaded. There were between seven hundred and eight hundred of them. The children who had not yet reached adolescence and the women were taken prisoner, and their wealth was seized. All of this is stated both briefly and in detail, with evidence and Hadiths, in the book of Sirah which we have written, praise and blessings be to Allah.
Sahih Muslim 1766 - It has been narrated on the authority of Ibn Umar that the Jews of Banu Nadir and Banu Quraiza fought against the Messenger of Allah who expelled Banu Nadir, and allowed Quraiza to stay on, and granted favour to them until they too fought against him. Then he killed their men, and distributed their women, children and properties among the Muslims, except that some of them had joined the Messenger of Allah who granted them security. They embraced Islam. The Messenger of Allah turned out all the Jews of Medina. Banu Qainuqa' (the tribe of 'Abdullah b. Salim) and the Jews of Banu Haritha and every other Jew who was in Medina.
Sunan an-Nasai 3429 - It was narrated that Kathir bin As-Sa'ib said: "The sons of Quraizah told me that they were presented to the Messenger of Allah on the Day of Quraizah, and whoever (among them) had reached puberty, or had grown pubic hair, was killed, and whoever had not reached puberty and had not grown pubic hair was left (alive)."
Sunan Abu-Dawud 4404 - Narrated Atiyyah al-Qurazi: I was among the captives of Banu Qurayzah. They (the Companions) examined us, and those who had begun to grow hair (pubes) were killed, and those who had not were not killed. I was among those who had not grown hair.
Evidence from the earliest two Siras (biographies) of Muhammad:
Ibn Ishaq, A. Guillaume (translator) (2002), The Life of Muhammad (Sirat Rasul Allah), Oxford University Press, p. 464. - Then they surrendered, and the apostle confined them in Medina in the quarter of d. al-Harith, a woman of B. al-Najjar. Then the apostle went out to the market of Medina (which is still its market today) and dug trenches in it. Then he sent for them and struck off their heads in those trenches as they were brought out to him in batches. Among them was the enemy of Allah Huyayy b. Akhtab and Ka`b b. Asad their chief. There were 600 or 700 in all, though some put the figure as high as 800 or 900.
History of Al-Tabari, Volume 8, Victory of Islam, p. 35-36 - The messenger of God went out into the marketplace of Medina and had trenches dug in it; then he sent for them and had them beheaded in those trenches. They were brought out to him in groups. Among them were the enemy of God, Huyayy b. Akhtab, and Ka’b b. Asad, the head of the tribe. They numbered 600 or 700—the largest estimate says they were between 800 and 900. As they were being taken in groups to the Messenger of God, they said to Ka’b b. Asad, "Ka’b, what do you understand. Do you not see that the summoner does not discharge [anyone] and that those of you who are taken away do not come back? By God, it is death!" the affair continued until the Messenger of God had finished with them.
When presented with overwhelming scriptural evidence, those who defend Muhammad try to claim that Banu Quraiza betrayed Muslims by violating a treaty, so the massacre was justified. While the evidence for the betrayal is scanty at best, I'm not going to argue against that here. What people should simply think over is which decent human being would mass murder and enslave an entire population for their leaders violating a treaty?
A second line of defense is that it was not Muhammad who gave the verdict, but Sad bin Muadh. This is a very silly defense because it was none other than Muhammad who appointed Sad for the verdict. Not only did Muhammad hail his verdict as "Allah's verdict" (Sahih al-Bukhari 3804), he also witnessed and participated in carrying it out.
To conclude, there is nothing that can justify this massacre and enslavement. It was an act of bloody, merciless and collective punishment. It is impossible to consider Muhammad as a role model for humanity in light of this well-documented incident.