ABUJA - Suspected Boko Haram fighters ambushed a convoy carrying the head of the Nigerian army, the military said on Sunday, sparking a firefight in which 10 militants and a soldier were killed.

Lieutenant General Tukur Buratai, who was unharmed, was visiting troops in the northeast 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.

"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." News of the attack came with United Nations Secretary-General Ban Ki-moon due to arrive in Nigeria later Sunday to commemorate the fourth anniversary of a deadly attack on the global body by Boko Haram in the capital Abuja.

The Islamist group has stepped up its attacks in Borno and two neighbouring states in its northeastern heartland since President Muhammadu Buhari came to power in May.

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. Ban is due to hold talks with Buhari on development, climate change, human rights and countering violent extremism during his two-day visit, according to his spokeswoman Eri Kaneko.

He will lay a wreath to commemorate the fourth anniversary of a car bombing at United Nations House, the headquarters for around 400 UN employees, that left 21 dead in the capital on August 26, 2011.

The visit will be Ban's second since taking office in 2007. He last visited Nigeria in May 2011 to discuss the crises in southern Sudan and Libya with then leader Goodluck Jonathan.

The UN chief is also due to dine with captains of industry and the west African nation's state governors during the two-day trip, a statement from the Nigerian foreign ministry said.

Ban will visit members of "Bring Back Our Girls", the campaign said on its website, although the announcement has not immediately been confirmed by the government or UN.

The group will mark 500 days next week since the abduction of more than 200 schoolgirls from the northeastern village of Chibok by Boko Haram.

The secretary-general will stop over in France on his return trip to discuss preparations for a major climate change conference to be held in Paris in December.