section_path: Companionship of Muhammad/Military career
section_name: Military career
paragraph_text: Military career
  
  Ali accompanied Muhammad in all of his military missions except the Expedition of Tabuk in 630, during which Ali was left behind in charge of Medina. The hadith of the position is linked to this occasion, "Are you not content, Ali, to stand to me as Aaron stood to Moses, except that there will be no prophet after me?" This statement appears in the canonical Sunni sources Sahih al-Bukhari and Sahih Muslim, among others. For the Shia, this hadith signifies Ali's usurped right to succeed Muhammad. In the absence of Muhammad, Ali commanded the expedition to Fadak in 628.
  
  Ali was renowned for his bravery on the battlefield, and for his magnanimity towards his defeated enemies. He was the standard-bearer in the Battle of Badr (624) and the Battle of Khaybar (628). He vigorously defended Muhammad in the Battle of Uhud (625) and the Battle of Hunayn (630), and Muslims' victory in the Battle of Khaybar has been attributed to his courage, where he is said to have torn off the iron gate of the enemy fort. Ali also defeated the pagan champion Amr ibn Abd Wudd in the Battle of the Trench in 627. According to al-Tabari, Muhammad reported hearing a divine voice at Uhud, " no sword but Zulfiqar, no chivalrous youth (fata) but Ali." Ali and another companion, Zubayr, apparently oversaw the killing of the Banu Qurayza men for treachery in 626 – 627, though the historicity of this account has been doubted.