The Nigerian army might be ready to face new dangers in Boko Haram's campaign as new challenges are coming up.
The moment military convoys leave the relative safety of Bama, Borno state's second town, soldiers in the lead vehicle open fire with a heavy cannon into the scrub along the road to pre-empt attacks by remaining fighters from the Islamist group.
As they head for the regional capital, Maiduguri, the soldiers scan the road for bombs or booby-traps, while shooting at any possible cover - abandoned petrol stations, burned out farmhouses, trees, even clumps of elephant grass.
Jeep drivers behind them in the convoy join in, firing assault rifles indiscriminately through windows with one hand while gripping the steering wheel with the other.
"If there is somebody there and you fire at him, he definitely wants to fire back so then you know his position and take action," said Colonel Adamu Laka, the military commander in Bama. "You are trying to seize the initiative."
Such extreme measures highlight the lack of security across Borno despite the army's success in driving Boko Haram out of occupied territory that 18 months ago was the size of Belgium.
Reuters was given access to the Nigerian army on the ground as it seeks to reimpose order in Borno after seven years of dominance by Boko Haram, one of the world's deadliest Islamist groups and a major challenge to a government also grappling with an economic crisis caused by plunging oil prices.
As the first international reporting team to travel through the area by road since Boko Haram was pushed back, Reuters was able to see the devastation caused by the group. Roads are highly dangerous, no food is grown in the fields, and people are still trickling out of their hiding places in the bush.
The military campaign has curbed an insurgency that has killed at least 15,000 people since 2009 but in a new phase of the conflict, the army now finds itself facing small groups of guerrillas operating in the sparsely populated, wooded terrain.
In July, Boko Haram fighters hiding in trees along the Bama-Maiduguri road ambushed a United Nations aid convoy, wounding five people.
With the U.N. saying up to 5.5 million people in the northeast might need food aid this year, the military is under intense pressure to make roads safer. It is no easy task.
"There are so many ambush sites along the road so we are cutting the trees," Colonel Laka said.
As Boko Haram has been forced back, the government and aid agencies have been able to assess for the first time the extent of the humanitarian disaster left in the jihadists' wake.
The U.N. children's agency, UNICEF, said last month nearly half a million children were at risk of 'severe acute malnutrition' in the area around Lake Chad that has been ravaged by Boko Haram.
According to UNICEF, in Borno, where two in three medical centres or clinics had been partially or completely destroyed, 49,000 children will die this year if help does not arrive.
"Towns and villages are in ruins and communities have no access to basic services," UNICEF said.
Describing civilians liberated by the army, Mohammed Kanar, northeastern coordinator for the national relief agency, said: "You will see them emaciated. As for an adult man, you can even count his ribs."
The numbers could well rise as civilians emerge from the countryside into towns now controlled by the army.
"We had to leave the bush because we were hungry," said Haja Jamil, 40, a pregnant yet painfully thin woman who arrived in Bama two weeks ago with two children.
"Boko Haram kept coming and hassling us. We are still afraid of them," she said, sitting on the floor of a military clinic in Bama while feeding her 3-year-old daughter, Aisha.
Since President Muhammadu Buhari, a former military ruler, took office last year, the army has found fresh resolve against Boko Haram, which has been fighting to establish a mediaeval caliphate in the southern stretches of the Sahara.
The military has moved its headquarters to Maiduguri, drafted in new generals and improved cooperation with neighbouring countries, allowing it to capture and take control of dozens of towns such as Bama.
But the plight of Bama shows the extent of the challenge in recovering from the group's scorched earth campaign.
Once a city of more than a quarter of a million people, Bama is now a ghost town, littered with burnt-out buildings and home to 11,000 people living behind military fortifications.
Goats nibble at grass growing in cracks in the road. Piles of rubbish fester in ditches. The main street is lined with fire-gutted banks and shops, walls daubed with graffiti in Arabic saying "God is Great".
Before it left, the group, whose name means 'Western education is sinful' in the local Hausa language, also ransacked schools and the palace of Bama's traditional ruler.
Now, soldiers camp in abandoned shops behind walls of sand-bags. Officers work in a tent, near a wall painted with the black flag of Middle East militant group Islamic State, to which Boko Haram pledged loyalty this year.
The army has set up makeshift classrooms for displaced children and piles of concrete blocks trucked in from Maiduguri point to hoped-for reconstruction, but the proximity of Boko Haram in the Sambisa forest - its final bolthole, according to the army - makes normality a distant dream.
"It's just four or five kilometres from here. Once you cross the river you start meeting their checkpoints," Laka said, pointing towards the forest on a tour of Bama's outskirts in a bullet-proof jeep.
The fight against Boko Haram has been complicated by an apparent split in the group after Islamic State's magazine announced Abu Musab al-Barnawi as new leader. The previous leader, Abubakar Shekau, appears to have rejected the move.
But dangers remain for the military and, above all, for young people. While Barnawi rejects Shekau's strategy of suicide bombings in crowded areas, analysts think he could regroup in rural areas to stage targeted strikes against the army.
And both groups will be competing for recruits at a time when many displaced children are not in school. That will reduce their job prospects and leave them vulnerable to Islamists ready to exploit grievances over poverty and unemployment.
ANGER, AND HUNGER
For now, the military says Boko Haram is low on ammunition and food. Heavy rains have however prevented any advance into Sambisa, whose dirt tracks do not suit tanks and artillery.
"Once we go in with any equipment it's difficult to operate. So we rely on foot patrols," Laka said.
Meanwhile, everything from bread to ammunition to medicine comes in from Maiduguri by road, passing abandoned farms, deserted petrol stations, bombed mosques and gutted tanks.
Behind its fortifications, Maiduguri has become an oasis of safety that is choking under the pressure.
Its population over the last few years has almost tripled to 5 million, according to the national relief agency, causing shortages of everything from living space to food and cash.
Food price riots broke out twice in August, with crowds smashing cars outside one location until police restored order.
Many are desperate to go home, turning up at dawn at Maiduguri's minibus taxi rank to take their chances on the Bama road, only to be turned back by soldiers on the outskirts of the city. Thousands are now trapped in Maiduguri.
"They have spent all their money and eaten all the food they brought," said Mohammed Tada, sitting on the back of a truck laden with women, children and bags that had halted at a checkpoint. "All the people are suffering from hunger."