Though one member of the tribe, Abu Marthad al-Ghanawi, was an early companion of the Islamic prophet Muhammad, most of the tribe converted after the defeat of the pagan Arab tribes at the Battle of Hunayn in 630. They remained Muslim when many of the converted Arab tribes apostatized during the Ridda wars following Muhammad's death in 632. Many Ghani tribesmen migrated to Syria during the Muslim conquest of the region between 634 and 638. Following the rout of the Qaysi tribes at the Battle of Marj Rahit in 684, the Qaysi–Yamani wars ensued. During the long-running conflict, the Banu Ghani fought alongside their Qaysi kinsmen against the Yamani tribes and the Taghlib.