Boko Haram's shadowy leader Abubakar Shekau has appeared in a new video vowing to fight on, shrugging off an apparent split in the hardline jihadist group blamed for thousands of deaths since 2009.
"I... Abubakar Ash-Shakawy (Shekau), the leader of Jama'atu Ahlissunnah Lidda'awati Wal Jihad, made it a duty for myself (to fight) Nigeria and the whole world," Shekau said in the video released on Sunday, using the group's name since it declared allegiance to the so-called Islamic State.
Last week, Shekau said in an audio message he was still head of the group despite his purported replacement by Sheikh Abu Musab al-Barnawi, a former Boko Haram spokesman.
"We have no desire to fight our Muslim brethren," Shekau, who last appeared in March, said in the 24-minute video.
Shekau ridiculed suggestions that he was dead, and looked more composed and energetic than in previous appearances.
"I'm alive by the permission of Allah," he said in his speech in Arabic and Hausa, adding that he would only die when his time came.
In the video he is wearing camouflage gear and holding a machine gun, standing between two Islamist fighters in balaclavas armed with rocket-propelled grenade launchers.
He taunted President Muhammadu Buhari's administration and condemned Western countries including the United States, France, Germany and "the tyrants of the United Nonsense (UN)".
At the end of his speech -- apparently filmed in Boko Haram's stronghold in the Sambisa forest of northeastern Nigeria -- he fired off rounds of ammunition into the air.
His absence in recent months had sparked speculation about his fate and whether he had been deposed as Boko Haram's chief.
Barnawi's appointment was contained in a magazine issued by the Islamic State group, to which Boko Haram pledged allegiance in March last year.
Shekau dismissed Barnawi as an infidel who condoned living in an un-Islamic society without waging jihad.
Shekau became leader after Nigerian security forces killed the group's founding chief Mohammed Yusuf in 2009.
Omar Mahmood, a security analyst with US-based Foreign Policy Research Institute who has spent the past five years researching Boko Haram, said Shekau was removed because of his highhandness and ruthlessness.
"One thing that has remained constant, however, is the focus on attacks against regional security forces, with Muslim civilian deaths still ignored. This aspect seems to be a key concern for IS propagandists," Mahmood said.
"By contrast, Abu Musab al-Barnawi, the man announced as the new leader, clearly stated in his al-Naba interview that attacks against Muslim civilians, mosques and markets will not be a staple of his leadership."
Sources close to Boko Haram said Barnawi, aged in his early twenties, is none other than Habib Yusuf, the eldest son of group founder Yusuf.
They said he was put under Shekau's care following the death of his father, but the pair fell out over ideological and operational differences.
Boko Haram has been blamed for some 20,000 deaths and displacing more than 2.6 million people since it launched a brutal insurgency in Nigeria in 2009.
Nigerian forces, with the support of regional troops, have recaptured swathes of territory lost to the jihadists since they launched a military campaign in February 2014.