Battle of the trench in Medina
The conflict between the people of Medina and Mecca sustained for a long period of time. Abu Sufyan, the governor of Mecca used to formulate an army force against Prophet Rasul Allah ﷺ and his companions. However, even though the Meccans always outnumbered the force of Medina, the former was forced to withdraw. This mainly happened because the strategies of Prophet Rasul Allah ﷺ were stronger than that of the Abu Sufyan. Moreover, Allah always supported Prophet Rasul Allah ﷺ and his force by sending down the angels i.e., Jibrael and much more to aid the Medina force.
After the conclusion of the battle of Uhud, Ibn Sufyan again attempted to announce a battle against medina by preparing an army force. This was because the tribes of Medina dug the channel to safeguard the country and the people residing in the same from the rivals. After a prolonged blockade and several combats, the army of Sufyan was compelled to withdraw and run back to their land.
The reason for why the Meccans army couldn’t win against the force of Medina was that Abu Sufyan offers a proposal to the Jews belonging to the group of Banu Qurayza. The consent stated that the Jewish tribes and the army force of Abu Sufyan would assault the tribes of Medina that were responsible to defend the city. However, the Muslims were informed about this plotting and the plan of Abu Sufyan was obstructed. After the withdrawn of Meccans from the battle of the trench, Prophet Rasul Allah ﷺ instantly went to the tribes of Banu Qurayz and announced a siege against them. Banu Aus (the rivals of Banu Khauzraj) also act as an arbitrator against the Jewish tribes and the ultimate result was that the entire Jewish men were slaughtered and the women and children were enslaved. This measure was a confirmation that Medina is safe.