Muhammad to al-Waqidi, after Abd-Allah ibn Ubaiy spoke for them, Muhammad refrained from executing them and commanded that they be exiled from Medina. Following the Battle of Badr, Muhammad also made mutual-aid alliances with a number of Bedouin tribes to protect his community from attacks from the northern part of Hejaz. The Meccans were eager to avenge their defeat. To maintain economic prosperity, the Meccans needed to restore their prestige, which had been reduced at Badr. In the ensuing months, the Meccans sent ambush parties to Medina while Muhammad led expeditions against tribes allied with Mecca and sent raiders onto a
Battle of the Trench many alliances against the Muslim expansion. Nevertheless, he was unable to prevent the Meccan one. As they had in the battles of Badr and Uhud, the Muslim army again used strategic methods against their opponents (at Badr, the Muslims surrounded the wells, but did not deprive their opponents of water since Ali did not want to follow the footsteps of the Meccan army; at the Battle of Uhud, Muslims made strategic use of the hills). In this battle they dug a trench to render the enemy cavalry ineffective. The reason for this battle was to defend Medina from attack, after