UN chief Ban Ki-moon began a two-day visit to Nigeria Sunday in the wake of a suspected Boko Haram ambush on the army chief, saying it was "a time of hope" despite the rise of extremism.
Combating Islamist violence is expected to be high on the agenda as the secretary-general holds talks with President Muhammadu Buhari, whose inauguration in May sparked a massive upsurge in jihadist attacks.
"Across our world, we see insecurity, inequality, growing divides," Ban told a private meeting of state governors in Abuja, according to a UN statement.
"Here in Nigeria, you know the challenges all too well –- including the rise of extremism and the lack of equal opportunity.
"I know this is a deep and vital challenge in particular for the governors of the northeast... This is also a time of hope. I want to commend you and all of Nigeria's leaders for the peaceful democratic transition of power."
Ban touched down at Abuja's international airport just hours after the military revealed Boko Haram fighters had ambushed a convoy carrying Nigeria's army chief-of-staff Lieutenant General Tukur Buratai.
The senior officer, who was unharmed, was visiting troops Saturday when insurgents attacked in Faljari village, 45 kilometres (28 miles) east of Borno State capital Maiduguri, army spokesman Sani Usman said in a statement.
- 'Overwhelming firepower' -
"The terrorists encountered an overwhelming firepower from the troops in which 10 of them were killed. The troops captured five terrorists," he said.
"During the encounter, sadly, we lost a soldier, while an officer and four soldiers sustained gunshot wounds."
Boko Haram has stepped up its attacks in Borno and two neighbouring states in its northeastern heartland since Buhari came to power in May.
The Islamists have also carried out deadly ambushes across Nigeria's borders and in recent weeks suicide bombers, many of them women, have staged several attacks in Nigeria, Cameroon and Chad.
The fresh wave of violence has claimed more than 1,000 lives over the last three months, dealing a setback to a four-country offensive launched in February that had chalked up a number of victories against the jihadists.
An 8,700-strong Multi-National Joint Task Force, drawing in Nigeria, Niger, Chad, Cameroon and Benin, is expected to go into action soon.
Military officials have said it will be more effective than the current alliance in the battle to end Boko Haram's six-year insurgency, which has claimed at least 15,000 lives.
"This a crucial moment for Nigeria," said Ban, on his second visit to Africa's largest economy since taking office in 2007.
"You face many serious challenges but you have also taken a hugely important step to move forward in a way that can respond to the aspirations of the country's people."
- Deadly UN bombing -
Before his departure the UN chief will lay a wreath to commemorate the fourth anniversary of a Boko Haram bombing at Abuja's United Nations House, the headquarters for around 400 UN employees, that left 21 dead in June 2011.
He is also due to dine with captains of industry and discuss "democracy, human rights and countering violent extremism" in a meeting at the foreign ministry.
Ban last visited Nigeria in May 2011 to discuss the crises in southern Sudan and Libya with then leader Goodluck Jonathan.
Buhari, who came to power on May 29 vowing to destroy Boko Haram, replaced his military leaders earlier in August, ordering his new chiefs-of-staff to end the insurgency within three months.
The military under Jonathan was heavily criticised for poor handling of the insurgency and its failure to free more than 200 schoolgirls abducted from the northeastern town of Chibok in April last year.
Ban is due to head to France late on Monday to discuss preparations for a major climate change conference to be held in Paris in December.