The brazen operation — which unfolded around the very city where Boko Haram was born — turned the spotlighct on the authorities' struggle to quell the militants' nearly nine-year-old offensive.
Boko Haram fighters attacked a military base in the Cashew Plantation area at the entrance to the city with suicide bombers, mortars and guns, leading to a prolonged battle, a senior military officer in Maiduguri said.
"Eighteen Boko Haram terrorists on foot attacked the military base while seven suicide bombers targeted residents of nearby Bale Shuwar and Alikaranti villages at 8:50 pm," said the officer, who asked not to be identified as he was not authorised to speak about the incident.
Nigerian army thwarts Boko Haram attack on Maiduguri
"The terrorists fired mortars at troops," the officer said.
Bello Dambatto, chief security officer at the State Emergency Management Agency (SEMA), told AFP that an initial death toll of 18 had risen to 20 after two people died in hospital from their wounds.
"We are not sure if the remaining 82 wounded victims will make it. Some of them are in critical condition and will require major surgery from their wounds, which are mostly from gunshots."
One soldier was among the dead, the army said in a statement, which added that it had killed six insurgents and "neutralised" seven suicide bombers.
The attackers were trying to infiltrate into the city, said Ba'Kura Abba Ali, a militia leader in the area helping soldiers in fighting Boko Haram.
The assailants climbed up a trench that had been dug in the sand round the city to stave off Boko Haram suicide and gun attacks, and attacked troops, Ali said.
Maiduguri residents reported hearing at least five explosions and sounds of gunfire coming from the Cashew Plantation area.
"Huge blasts and sounds of gunshots were heard all over the city last night and they continued for more than an hour," said one resident, Ibrahim Gremah.
Boko Haram's nearly nine-year fight to establish a hardline Islamic state in northeast Nigeria has claimed at least 20,000 lives and displaced more than two million people.
104 abducted Nigerian schoolgirls freed by Boko Haram
Hundreds of thousands are holed up in Maiduguri, the capital of Borno state, where they are living in camps or with host families.
On Friday, four girl suicide bombers aged between 13 and 18 killed two people in multiple attacks in Zawuya settlement on the outskirts of Maiduguri in the first assault since the government announced it was in ceasefire talks with Boko Haram.
The attacks highlight the challenge the government faces in striking a ceasefire agreement with the militant group.
In February, when more than 100 schoolgirls were returned to Dapchi after being kidnapped by Boko Haram, Nigerian President Muhammadu Buhari said his government was offering amnesty to "repentant" militants.
But the process is troubled by factionalism within Boko Haram, say senior security officials.
The group is divided into two factions that have competing goals and operational methods.
One, led by Abu Mus'ab al-Barnawi and affiliated with the so-called Islamic State, is reportedly in talks with the government. The other, led by Abubakar Shekau, is notorious for suicide bombings.
"Talks have been ongoing between the government and the insurgents from the Al-Barnawi faction," said a source, speaking on condition of anonymity.
The source said peace talks began in earnest after the July 2017 attack on an oil exploration team in Lake Chad that killed at least 69 people.
"The major headache now is extending the talks to the Shekau faction which is averse to negotiations. Dealing with them is quite problematic."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ