After their expulsion from Mecca, the Muslims fought the Meccan Quraysh at the Battle of Badr in 624, and at the Battle of Uhud in 625. Although the Muslims neither won nor were defeated at the Battle of Uhud, their military strength was gradually growing. In April 626 Muhammad raised a force of 300 men and 10 horses to meet the Quraysh army of 1,000 at Badr for the second time. Although no fighting occurred, the coastal tribes were impressed with Muslim power. Muhammad also tried, with limited success, to break up many alliances against the Muslim expansion. Nevertheless, he was unable to prevent the Meccan one.
As with the battles of Badr and Uhud, the Muslim army used unconventional methods against their opponents (at Badr, the Muslims surrounded the wells, depriving their opponents of water; 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. See the video