By the fourth century, Arab tribes began to encroach from Yemen, and there were three prominent Jewish tribes that inhabited the city into the 7th century CE:
the Banu Qaynuqa, the Banu Qurayza, and Banu Nadir.
The reason for this battle was to defend Medina from attack,
after Banu Nazir and Banu Qaynuqa tribes formed an alliance with the Quraysh to attack
him as revenge for expelling them from Medina during the Invasion of Banu Qaynuqa and Invasion of Banu Nadir.