Nigeria's Islamic State West Africa Province, a faction of Boko Haram affiliated to the Islamic State militant group, has intensified attacks against the army in the northeast of the country at an alarming rate, and the military appears to be struggling. Here are the principal reasons:
Fighters from the Islamic State-affiliated group, known by its acronym ISWAP, have managed to assemble a potent arsenal thanks to raids on military bases and capturing weapons in attacks, but also through arms smuggling from other African countries.
On December 27, the jihadists showed their force again during a brief takeover of Baga town: In just a few hours, the militants had routed around 500 soldiers from the multi-national MNJTF force comprising of soldiers from Nigeria, Niger, Chad and Cameroon.
As with many attacks, after the soldiers fled, the militants took advantage to captured weapons, ammunition and vehicles at the strategic base on the shores of Lake Chad.
"The truth of the matter is that Boko Haram are better equipped than soldiers which is why they keep attacking and forcing soldiers out of military bases," Sanda Kime, a pro-government militiaman in the Lake Chad region, told AFP.
"There is a paucity of arms and ammunitions for our fighting troops. It is a serious problem," said Amaechi Nwokolo, a security analyst with the Roman Institute of Security Studies in Abuja.
There are increasingly more voices from within the ranks of the military decrying the poor state of their equipment, such as bullet supplies that are incompatible with the army's standard rifles.
The increase in arms-trafficking in sub-Saharan African has also allowed ISWAP to acquire "more sophisticated" equipment, most notable from the Horn of Africa and the Middle East via Sudan, according to Yan St Pierre, a counter-terrorism expert with MOSECON, a Berlin-based security consultancy.
Nigeria's security situation has deteriorated rapidly in the last few years, forcing the army to deploy on numerous fronts in several parts of the country.
"The morale of troops is low. They have been pushed to breaking limit," said Abuja analyst Nwokolo.
In August, hundreds of soldiers invaded the runway of Maiduguri airport, in Borno state, firing their weapons in the air to express their exhaustion after four years on the frontline without much leave from the fight against jihadists to see their families.
The army managed to make important military progress against jihadists at the end of 2015 chasing the militants out of areas under their control but since then the fighters have adopted guerrilla tactics that are more complex to counter.
"The soldiers are fatigued. Sometimes they withdraw when Boko Haram attack their base after a brief encounter or without putting a fight at all," said one Nigerian security source who spoke on condition of anonymity because they were not authorised to speak to reporters.
In his New Year's message, Nigeria's Air Force Chief of Staff Marshal Sadique Abubakar said jihadists had added experienced IS foreign fighters to their ranks.
"In the fight against Boko Haram, we saw the emergence of new tactics as well as the introduction of highly experienced and skilled fighters and technology, as ISIS elements, dislodged from Syria, relocated to the North East of our country," he said.
Rumours about Boko Haram bringing foreign fighters into its ranks are not new, but in recent months several witnesses and experts have added weight to reports of such recruitment.
For security expert St Pierre, IS military defeats in Iraq and Syria, and the group's expansion in the Sahel region and the Sahara, has "considerably" improved the mobility of militant fighters in Africa.
The analyst said ISWAP has conducted an intensive recruitment campaign in Nigeria and in neighbouring countries such as Niger and Chad for six months, where its radical imams present the jihadist group as a "credible and legitimate" alternative to government.
On Christmas Eve, ISWAP militants stormed a military base in Kukareta, Yobe State in the northwest Nigeria, killing 17 soldiers. One local chief said the fighters were likely Chadians by their physical appearance and the language they spoke.
One Boko Haram faction led by Abubakar Shekau used suicide bombings and mass horde attacks in assaults that nowadays seem like tactics from another era.
Boko Haram split into two -- Mr Shekau's faction and the ISWAP -- in mid-2016 over ideological differences.
Mr Shekau pledged allegiance to IS leader Abu Bakr Al-Baghdadi, but the IS group gave its formal backing only to ISWAP.
ISWAP disagreed with Mr Shekau's indiscriminate use of violence against civilians and vowed to only hit "hard" military or government targets.
In 2016, Islamic State named a new local leader Abou Mussab al Barnaoui, who looked to attract more support from the local population.
"ISWAP fighters have focussed on military bases and what they consider to be the symbols of oppression and government repression," security consultant St Pierre said.
As a result, civilians are often locked up in camps for displaced people in areas under tight army control, but a semblance of normal life has returned in areas under Islamist militant influence.
"Where the army ordered the markets shut down and supply lines cut, they have restructured trade" in fishing and farming, which are the principal sources of revenues for the region, the MOSECON consultant said.
The new strategy of winning support of local populations is much more dangerous than militant chief Shekau's old tactics in the face of the Nigeria's army's impotence, he said.