The Battle of Banu Qurayza is the last battle of the Prophet (s) with the Jews of Medina that took place in 5/626. The main reason of the battle was Jews' violation of their treaty with the Prophet (s), and their cooperation with the polytheists in the Battle of Ahzab against Muslims.
When the army of polytheists of Mecca and their allies approached Medina, Huyyay b. Akhtab -one of the Jews form Banu Nadir tribe, who had a major role in the formation of the army of the polytheists- met with the Banu Qurayza leaders as the representative of the polytheists and they agreed to cooperate with the polytheists against Muslims.
When the report reached the Prophet (s) he sent a group, among them Sa'd b. Mu'adh, Sa'd b. 'Ubada, and Usayd b. Hudayr, to the stronghold of Banu Qurayza to investigate the report. Banu Qurayza in their meeting with the group disdained the Prophet (s) and rejected their treaty with Muslims.
Because of the geographical location of Banu Qurayza they could attack Medina when Muslims were defending the trench; therefore the report of the betrayal of Banu Qurayza demoralized Muslims. According to some reports, when polytheists' army besieged Medina, Banu Qurayza decided to attack Medina overnight, and sent some messages to the polytheists and requested force. Hearing the report, the Prophet (s) sent 200 Muslim men to defend Medina and say takbir till morning, with the lights of day, the danger resolved.
One night about ten of Jew fighters attacked the city and returned after an hour of struggle with a group of Muslims. It is narrated from Abu Bakr: "we were more scared about our children and women from Banu Qurayza than from Quraysh and Ghatfan".
The day after the dissipation of the polytheists in the Battle of Ahzab, the Prophet (s) went for the battle with Banu Qurayza. Read more...