MAIDUGURI, Nigeria — Jihadis linked to the Islamic State group attacked the northeastern Nigerian town of Dikwa and humanitarian posts there, security officials said.

The attack in Borno state that began late Monday night came about 48 hours after the governor of Borno state, Babagana Zulum, visited the community along with other officials, to distribute cash and food to displaced families there.

The assailants arrived in trucks and motorcycles, surrounding residents and people staying at a camp for people who are displaced within Nigeria, residents said.

The member representing Dikwa at the Borno state House of Assembly, Zakariya Dikwa, said they burned down the police station, the primary health center and attacked humanitarian offices and left with their vehicles.

“The attack was massive because the Boko Haram fighters went there with over 13 gun trucks — all of which had their bodies pasted with mud,” he said.

The military later confirmed the fighters are with Boko Haram offshoot The Islamic State of West Africa Province, known as ISWAP. It said in a statement Tuesday that the military had routed the jihadis from Dikwa with heavy bombardment and firepower. The jihadis tried to invade the town after hearing of the food distribution.

The U.N. coordinator of humanitarian affairs in Nigeria, Edward Kallon, also confirmed an attack on humanitarian facilities in Dikwa, saying several aid facilities were directly targeted, in a statement released by the UNOCHA office in Nigeria.

“The attack started last night and, as information is still coming through, I am outraged to hear the premises of several aid agencies and a hospital were reportedly set ablaze or sustained damage,” he said. “I strongly condemn the attack and am deeply concerned about the safety and security of civilians in Dikwa, including internally displaced people inside and outside camps and thousands of people who had returned to the community to rebuild their lives after years in displacement.”

The attack “will affect the support provided to nearly 100,000 people who are desperately in need of humanitarian assistance and protection, particularly as the COVID-19 pandemic risks spreading in Borno State,” he said.

U.N. spokesman Stephane Dujarric said “the humanitarian hub was managed by the International Organization for Migration,” the U.N. agency that provides services and advice concerning migration to governments and migrants, including internally displaced persons, refugees, and migrant workers.

ISWAP split from Boko Haram in 2016 and has become a threat in the region.

Nigeria has been fighting the more than 10-year Boko Haram insurgency that has killed tens of thousands of people and displaced millions.