Battle of Uhud and forced the Meccan lines back, thus leaving much of the Meccan camp unprotected. When the battle looked to be only one step away from a decisive Muslim victory, a serious mistake was committed by a part of the Muslim army, which altered the outcome of the battle. A breach of Muhammad's orders by the Muslim archers, who left their assigned posts to despoil the Meccan camp, allowed a surprise attack from the Meccan cavalry, led by Meccan war veteran Khalid ibn al-Walid, which brought chaos to the Muslim ranks. Many Muslims were killed, and Muhammad himself was badly injured.
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