structural:scholar_edition
During Muhammad's lifetime

During Muhammad 's era in Arabia, many tribes made use of fortifications. In the Battle of the Trench, the largely outnumbered defenders of Medina, mainly Muslims led by Islamic prophet Muhammad, dug a trench, which together with Medina's natural fortifications, rendered the confederate cavalry (consisting of horses and camels) useless, locking the two sides in a stalemate. Hoping to make several attacks at once, the confederates persuaded the Medina-allied Banu Qurayza to attack the city from the south. However, Muhammad's diplomacy derailed the negotiations, and broke up the confederacy against him. The well-organized defenders, the sinking of confederate morale, and poor weather conditions caused the siege to end in a fiasco.

During the Siege of Ta'if in January 630, Muhammad ordered his followers to attack enemies who fled from the Battle of Hunayn and sought refuge in the fortress of Taif.