When the Islamic prophet Muhammad, a member of the Banu Hashim, a clan of the Quraysh related to the Banu Umayya through their shared ancestor, Abd Manaf, began his religious teachings in Mecca, he was opposed by most of the Quraysh. He ultimately found support from the inhabitants of Medina and relocated there with his followers in 622. The descendants of Abd Shams, including the Umayyads, were among the principal leaders of Qurashi opposition to Muhammad. They superseded the Banu Makhzum led by Abu Jahl as a result of the heavy losses that its leadership incurred fighting the Muslims at the Battle of Badr in 624. An Umayyad chieftain, Abu Sufyan, thereafter became the leader of the Meccan army that fought the Muslims under Muhammad at the battles of Uhud and the Trench.