The Nigerian military says 18 people have been left dead after an ambush on a government convoy in the north-east of the country.
It said four soldiers, 10 police officers and four civilians were killed in the attack targeting Borno state officials on Friday.
The Islamic State (IS) group said it was behind the attack, claiming 30 people had been killed.
The military has been battling Islamist militants for more than a decade.
The militants planted improvised explosive devices (IEDs) on the road from the town of Monguno to the fishing town of Baga, said Maj Gen John Enenche, the spokesperson of the Nigerian Defence Headquarters, in a statement.
Troops later captured a gun truck from the militants and recovered two police vehicles the attackers had seized, the statement said.
The officials were on their way to finalise arrangements for displaced people to return to Baga when they were ambushed.
Borno State Governor Babagana Zulum was in an earlier convoy and was not hurt, the state government said.
The BBC’s Ishaq Khalid, in the Nigerian capital Abuja, says the attack could signify that rural areas are still not safe enough for displaced people to return.
More than 30,000 people have been killed and millions have had to flee their homes because of the insurgency by Islamist militants Boko Haram.
They launched their military operation in 2009 and their attacks have spread from north-eastern Nigeria to neighbouring countries Chad, Niger and Cameroon.
One faction broke away in 2016 and now fights under the banner of a group called Islamic State West Africa Province (ISWAP).