Shekau took command of the group after Yusuf's death, but clashed frequently over the years with al-Barnawi, who was reportedly at one point was picked instead by the Islamic State organization to lead Boko Haram. Instead, a breakaway faction was formed in 2016 that became known as the Islamic State in West Africa Province, or ISWAP.
Unlike Shekau’s group, which often violently targeted civilian populations, ISWAP under al-Barnawi targeted the Nigerian military and those who aided the soldiers. But it drew heightened global concern when it began targeting civilians working for international aid organizations in the northeast in a series of kidnappings and killings.
The faction still led by Shekau, meanwhile, weakened in recent years and his death was announced in May. ISWAP then sought to expand its reach but al-Barnawi failed to win over thousands of Shekau's followers and many surrendered to the Nigerian military instead.
The conflict in northeast Nigeria has directly caused the death of 36,000 people, according to U.N, officials, with more than 2.3 million people displaced.
Associated Press writer Haruna Umar in Maiduguri, Nigeria, contributed to this report.