Nigeria's President Muhammadu Buhari won elections in March partly on a promise to crush the militant Islamist group Boko Haram - and gave his military chiefs until the end of the year to beat the insurgents. Ahead of the deadline, the BBC's Martin Patience joined the army on patrol in the combat zone.
With the end-of-year deadline fast approaching, the Nigerian army was keen to show that progress was being made on the ground.
We left the city of Maiduguri - the birthplace of the militants - in a convoy, heading towards some of the most dangerous territory on earth.
Army jeeps mounted with heavy machine guns were at both the back and front of the convoy.
Until a few months ago, travelling along the 25km (15-mile) road from Maiduguri to the town of Konduga would almost certainly invite attack.
Now, it seemed relatively secure. But as one soldier told me: "It may look safe but that doesn't actually mean it is safe."
We weaved along the paved road avoiding potholes that were in fact craters created by improvised explosive devices (IEDs).
I saw ghost village after ghost village where mud-brick houses had been set on fire, their tin roofs pulled off. Many of the buildings were ridden with bullets.
This is classic Boko Haram scorched-earth tactics.
The insurgents raid villages - mostly at night or just before dawn - and then kill, rape, kidnap and loot before withdrawing.
After half an hour of driving, we pulled into the small military base in Konduga.
As we arrived, a handful of soldiers were posing for a quick group photograph. One of them was kneeling on the ground with his rifle pointing into the distance.
Ali Mohammed, a fisherman near Konduga military base
"You can't guarantee safety here, but you get used to it. There's nothing else we can do"
I met Brigadier General Mohammed Aliyu, a jovial man.
In the 1980s, he was training as a doctor. But, inspired by Gen Buhari - who briefly was a military ruler in Nigeria during the period - he quit medical school and signed up to the military.
Thirty years later, his enthusiasm and respect for the now democratically elected leader were still palpable.
Like many officers, Gen Aliyu believes President Buhari is intent on rebuilding the army, which was previously brought low by corruption and by what many saw as poor leadership.
In a report this year, the campaign group Amnesty International accused the military of carrying out atrocities.
It said that 7,000 men and boys had died in military custody during the conflict. The army rejected the allegations as "spurious".
Since the start of 2015, a large-scale military operation has pushed Boko Haram from a string of towns and villages.
Hundreds of mercenaries from South Africa reportedly played a crucial role in the fighting.
Gen Aliyu admitted there had been problems in the past.
"I think earlier we were not giving them [Boko Haram] the significance we are giving them now," he said.
"We thought there were small miscreants trying to do something and then they ended up surprising us.
"But now we know who Boko Haram are and we're taking them by their horns."
While the top brass are keen to put a positive spin on the progress, some of those in the lower ranks question the momentum.
One soldier told me privately that the army was still seriously under-equipped and that officers were downplaying the army's casualties in the field.
Boko Haram at a glance:
- Founded in 2002, initially focused on opposing Western-style education - Boko Haram means "Western education is forbidden" in the Hausa language
- Launched military operations in 2009
- Thousands killed, mostly in north-eastern Nigeria, hundreds abducted, including at least 200 schoolgirls
- Joined so-called Islamic State, now calls itself IS's "West African province"
- Seized large area in north-east, where it declared caliphate
- Regional force has retaken most territory this year
Following a short classified military briefing, the army took us to what should have been a bustling market, just a few hundred metres from the base.
Apart from a handful of people, it was deserted.
Dozens of shops had been burnt and looted. A mosque had been shot up, and on the main road lay the mangled metal carcass of a van that had been laden with explosives in a Boko Haram suicide attack.
The attack was foiled by soldiers who managed to shoot dead the bomber before he rammed their checkpoint.
There were a few signs of reconstruction: piles of cinder blocks were sitting beside the road. Some of the government buildings were getting new roofs.
But the town was a long way from being inhabitable once again.
The military then took us on a further 20-minute drive along the road to the village of Kawuri.
We saw more devastation and wreckage. And it, too, was deserted.
Until this year, the village had been under Boko Haram control. It had been the scene of a massacre in 2014 in which dozens were killed.
"God is Great" was scrawled in graffiti on some of the buildings. This is a common Islamic saying but in this part of the world it has been co-opted by Boko Haram as a tagline.
The soldiers then picked up a metal traffic sign lying on the side of the road.
It read: "Sambisa Forest."
This is one of the areas where the militant group retreated after being pushed out of towns it once controlled.
We were just a few kilometres from their stronghold. The forest is where the army are currently carrying out most of their operations to try and clear out the insurgents.
But access is difficult and ambushes are frequent.
For Boko Haram, it is a fall-back position.
Despite being on the defensive, the militants can still launch attacks. Increasingly, the group is using suicide bombers to blow up checkpoints and markets in nearby cities.
Until Boko Haram is cleared out of the forest - and from other remote areas - it is very difficult to see how this insurgency will end.
Back on the base, Gen Aliyu acknowledged the challenges of the campaign. He has studied the insurgencies in Afghanistan and Iraq. I asked him how he would define victory.
"When Boko Haram are significantly degraded and normal commercial and administrative activities are taking place," he said.
How far away are you from that, I asked.
"Not too far. Where you are standing now used to be the battlefront," he replied.
'Living in constant fear'
But that did not mean where I was standing was necessarily safe.
Not far from the base, the army took us to meet a group of fishermen bringing in their latest catch down by the river.
One of the fishermen, Ali Mohammed, told me he lived in constant fear of being attacked.
"You can't guarantee safety here, but you get used to it. There's nothing else we can do," he said.
It is clear that the Nigerian army has made gains but that does not mean the insurgency is over.
The nature of this conflict is changing, particularly with the use of suicide bombers.
Wars do not subscribe to deadlines and in this part of Nigeria, Boko Haram remains a deadly threat.