Two attacks less than 24 hours apart in northeastern Nigeria this week have laid bare the deadly but divergent strategies of Boko Haram and a rival jihadist group, the Islamic State West African Province (ISWAP).
How these insurgencies evolve will greatly shape the course of the country's decade-old crisis, say security experts.
The twin threats facing security forces came into focus with the attacks in Borno state.
On Sunday, a triple suicide bombing killed at least 30 football fans in Konduga -- an assault that bore the hallmarks of the original Boko Haram group, led by its long-time leader, Abubakar Shekau.
Shekau's faction typically use young women and children to target places of worship, markets and public places, seeking maximum civilian casualties.
Then, on Monday, more than 15 soldiers were killed, as heavily-armed militants overran Gajiram military base in a coordinated attack.
It followed the blueprint of attacks by ISWAP, whose stronghold is the Lake Chad region, where the porous borders of Chad, Nigeria, Niger and Cameroon come together.
The rival factions are rooted in Boko Haram, which in 2009 launched an insurgency with the goal of establishing an Islamic caliphate in northern Nigeria.
Since then, more than 27,000 people have died and 1.8 million have fled their homes. Burkina Faso, Chad and Niger have reeled as violence has spread there too.
ISWAP, a faction loyal to the so-called Islamic State (IS) group and led by Abu Musab Al Barnawi, a leader who has since fallen out of favour, emerged from Boko Haram in 2016.
ISWAP rejected Shekau, a tyranical figure who has appeared in several videos, deeming his strategy of indiscriminate attacks on Muslim civilians to be too brutal.
ISWAP is active in northeastern Nigeria, as well as the border area with Cameroon, the shores of Lake Chad and Niger.
A number of Boko Haram militants who have remained loyal to Shekau continue to operate in the Sambisa Forest and Mandara Mountains of the northeast, exploiting the region's rugged terrain.
- Terrorism as governance -
According to the International Crisis Group (ICG), ISWAP poses as an alternative government, fulfilling a role in one of the poorest regions in the world where many state services have been absent for years.
"By filling gaps in governance and services, (ISWAP) has managed to generate some support from local people," it said last month.
The group "digs wells, monitors livestock thefts, provides a minimum of health care. In the communities they control, taxes imposed are generally accepted by civilians," said the report.
And despite some attacks against civilians, ISWAP's targets are mostly military bases, where the group recovers weapons and vehicles.
In Gajiram, where at least 15 soldiers were killed on Monday night, the jihadists looted food stocks, but "did not hurt any civilians and made no attempt to attack the people who had taken refuge in the area, in the bush or at home", a local resident, Mele Butari told AFP.
As the conflict rages, with suicide attacks and killings on one front, and attacks on military bases on another, Nigeria's army have suffered.
Scores of soldiers have been killed this year across the region. Lacking equipment and training, troops have suffered a plunge in morale and desertions are on the rise.
The army have been unable to degrade ISWAP's activities, according to a member of a militia, fighting alongside the Nigerian army.
"ISWAP totally controls Lake Chad. None of its leaders have been arrested and none of its camps dismantled," he said, including in the districts of Duguri, Marte, Kukawa and Ngala where the main commanders live.
- 'Back in the game' -
After years of conflict, the Shekau-led Boko Haram have been left weakened by a lack of resources and men -- with a force between 1,500 to 2,000, compared to ISWAP's 3,500 to 5,000 force, according to ICG estimates.
Faced with ISWAP's rise and prominent media and propaganda campaigns, Boko Haram have countered, publishing a series of news releases and videos recently.
The suicide bombing last weekend in Konduga could serve as a statement, helping Shekau to "get back into the game," according to Jacob Zenn, a researcher at the Jamestown Foundation, an institute based in Washington.
"ISWAP has no operational problems on the ground, but faces an internal leadership crisis", he said.
He pointed to the eviction in March of Abu Musab Al Barnawi by supporters of a more radical faction within the group, and the assassination a few months ago of his deputy, Mamman Nur.
Amidst ISWAP's leadership turmoil, statement attacks by Boko Haram are a way of re-asserting their standing, he said.
A reunification of the two groups is "entirely possible," Zenn warned.