The Banu Qurayza lived in fortresses called utum, in plains stretching to Madina’s southeast. Making their living through agriculture and trade, the tribe was also related to the Banu Nadir. Together with the Banu Nadir, the Banu Qurayza were allies of the Aws tribe and became party to the Madina Constitution as allies of the Aws.
After the Banu Qaynuqa and the Banu Nadir’s banishment from the city on account of their violation of the terms of the treaty and their betraying Prophet Muhammad, remaining in Madina were the Banu Qurayza Jews. Despite the fact that in accordance with the Madina treaty the Banu Qurayza had to participate in the city’s defense, they violated this condition during the Battle of the Trench and formed an alliance with the Banu Nadir, who had settled in Khaybar after their expulsion, under the influence of Banu Nadir chief Huyay ibn Akhtab. Whereas, as Prophet Muhammad had made an agreement with them, he did not have the trench dug in the section where the Banu Qurayza resided and what is more, some of the equipment such as picks and shovels used in the digging of the trench were procured from the Banu Qurayza.
Having been betrayed by the Banu Qurayza, the Prophet sent 200 troops under the command of Salama ibn Aslam al-Ashhali and 300 troops under the command of Zayd ibn Harith in the event that they launch an attack on Madina. The Banu Qurayza’s treachery at the most critical point of the Battle of the Trench left the Muslims in an extremely difficult position. The danger was averted with Nu'aym ibn Mas'ud's acceptance of Islam, who was one of the prominent members of the Ghatafan tribe, and his creating a rift between the Banu Qurayza and their allies upon the Prophet’s command.
According to accounts in the sources, upon Prophet Muhammad’s return home after the Battle of the Trench and receiving Divine revelation in the afternoon, he summoned Bilal al-Habashi and ordered him to tell the Companions to perform the afternoon prayer on Banu Qurayza land. He then donned his armor, girded on his weapons and mounted his horse. Giving the standard to ‘Ali, the Prophet sent him along with the advance guard. Assigning ‘Abd Allah ibn Umm Maktum as his deputy in Madina, Prophet Muhammad himself set out on campaign despite being surrounded by infantry and cavalry troops (23 Dhu al-Qa'dah/15 April 627).
Some of the units, which set off at different times, fell into dispute regarding the performing of the afternoon prayer before arriving at Banu Qurayza land and whether or not this constituted opposition to the Prophet’s command. While some prayed it on time while still on the road, others performed the prayer after arriving on Banu Qurayza land at the time the night prayer approached. When the situation was reported to Prophet Muhammad, he did not express disapproval of either group and it was thus understood that both approaches were right.
Having reached the Banu Qurayza fortresses before the Prophet, ‘Ali witnessed the Jews here saying appalling things about Prophet Muhammad and his wives. Thinking that the Prophet would be upset to hear such talk, he requested of the Prophet not to approach the place where they were situated. The Prophet reminded him that Prophet Moses had faced much greater difficulties and stating the Banu Qurayza would not be able to say anything when they saw him, advanced all the way up to their fortresses. Calling out to the leading members of the Jewish community one-by-one, the Prophet invited them to accept Islam. Upon their refusal, he asked them to yield to the command of God and His Messenger and to come down from their fortresses and surrender. When this request too was rejected, the clash had begun. The Banu Qurayza were besieged for fifteen or twenty-five days during which a heavy barrage of arrows and stones was experienced. While the Muslims were comprised of 3000 troops and 36 cavalry, Banu Qurayza fighters, under the command of their Chief Ka’b ibn As’ad and ally Huyay ibn Akhtab, numbered around 600-700. There are also references to the numbers 400, 800, and 900 in reference to the numbers of the Banu Qurayza. In the meantime, the hypocrites went to the Banu Qurayza and called for them not to surrender to the Muslims, promising them their support in the event of the latter’s continued resistance. Desperate and powerless in the face of the continuing siege and seeing that the promised help from the hypocrites had not come, the Jews decided upon negotiating with the Prophet. They proposed leaving Madina under the same conditions as the Banu Nadir; that is, leaving their wealth and weapons behind and taking one camel-load of possessions each with them. Seeing that the Banu Nadir – who the Prophet had released two years earlier – had sided with the enemy during the Battle of the Trench, the Prophet rejected this proposal and told asserted that they must surrender unconditionally. The Banu Qurayza asked Prophet Muhammad to send them Abu Lubaba ibn ‘Abd al-Mundhir, a member of their ally the Aws tribe, in order for them to discuss certain matters with him. Wanting him to save them from this predicament, the Jewish tribe asked him what the Prophet had in mind for them. Indicating his throat with his hand, Abu Lubaba implied that they were to be executed. Shortly thereafter, however, he thought that in acting thus he had betrayed God and His Messenger and experienced great remorse. Going to the Prophet’s Mosque, he tied himself to a pole and – apart from the time spent to fulfil his basic needs – remained there for days, until his rope had been untied by Prophet Muhammad himself. His repentance being accepted (Al-Anfal, 8:27 or At-Tauba, 9:102) Abu Lubaba wanted to give away his entire wealth in charity, but upon the Prophet’s advice, reduced this to one-third of all his wealth.
Left desperate and powerless with the siege and acceding to the Prophet’s decision, the Banu Qurayza came down from their fortresses and surrendered. Meanwhile, taking into consideration the Khazraj’s 'Abd Allah ibn Ubayy ibn Salul formerly interceding on behalf of their allies, the Banu Qaynuqa Jews and saving them from the death penalty, the Aws also came to the Prophet and asked that their ally, the Banu Qurayza, be treated well. Thereafter, and on their suggestion, a decision was made to assign Sa'd ibn Mu'adh from the Aws tribe as arbitrator in making a judgment concerning the fate of the Banu Qurayza. While Sa'd ibn Mu'adh was being brought to the presence of Prophet Muhammad – having been wounded during the Battle of the Trench and therefore receiving treatment in a tent in Madina – members of the Aws constantly urged him to rule in favor of the Banu Qurayza. After receiving assurances from both the Aws and the Banu Qurayza, as well as from Prophet Muhammad that they would comply with his judgment, Sa’d announced his decision. Men old enough to fight were to be executed, women and children to be taken prisoner, and wealth to be distributed among the Muslims. Prophet Muhammad declared that Sa’d had judged in accordance to God’s judgment and attested to the soundness of his decision. Moreover, it is also evident that Sa’d’s ruling was in accordance with the Torah (Tasniya, XX:10-15) and that such a ruling also existed in the Qur’an (Al-Ma’ida, 5:33-34) among the punishments for those who wage war on God and His Messenger and who hasten to cause disorder and corruption on the earth.
While the Banu Qurayza captives were being held in specific locations, the war spoils were gathered together. It is narrated that the spoils appropriated from the Banu Qurayza amounted to 1500 swords, 300 suits of armor, 2000 spears, and 1500 shields. Thereafter, trenches were dug and those sentenced to death were executed. From the women, only a woman named Nubata, from the Banu Nadir, was executed because she had killed the Companion Hallad ibn Suwayd by dropping a millstone on his head upon the request of her husband, from the Banu Qurayza. Upon the Prophet’s command, those from the Banu Qurayza sentenced to death were permitted to read the Torah, were given food and drink, and their punishment was carried out in a cool environment.
Some of the women and children, said to number around 1000, were released. Some of them were given to the Companions, some were sold and the earnings used to buy horses and weapons. The Prophet ordered that children who had not yet reached puberty not be separated from their mothers, and that orphans be sold not to polytheists or Jews, but only to Muslims. After one-fifth of the war spoils (khumus) was put aside, the remaining four-fifths were distributed among the soldiers. The land and date gardens belonging to the Banu Qurayza were divided up. Among the spoils, infantry troops were given one share while cavalry troops were given two. The Prophet also gave some gifts to the women who had participated in the campaign. A share each was allocated for Hallad ibn Suwayd who was killed and Abu Sinan ibn Mihsan, who had died during the siege.
A number of people accepted Islam during the Banu Qurayza campaign. The Prophet married Rayhana bint Zayd ibn ‘Amr from among the captives, upon her acceptance of Islam. It is generally accepted that the twenty-sixth and twenty-seventh verses of the Qur’anic chapter entitled Al-Ahzab refer to the Banu Qurayza campaign.