Slideshow ( 2 images )

ABUJA (Reuters) - The United Nations voiced alarm on Wednesday at the uprooting of more than 30,000 Nigerians forced to flee the protracted war against Islamist insurgents in the country’s northeast.

Attacks by Islamic State in West Africa and the Boko Haram group that ISWA split off from have increased during the run-up to an election in which President Muhammadu Buhari will seek a second term. Security has become a campaign issue.

Militant attacks have seen notable towns in the northeastern state of Borno overrun by ISWA, and sent residents there fleeing to the relative safety of Maiduguri, the state capital.

“The impact of the recent fighting on innocent civilians is devastating and has created a humanitarian tragedy,” Edward Kallon, the head of U.N. operations in Nigeria, said in a statement on Wednesday.

A Dec. 26 attack on the town of Baga, 200 km (125 miles) north of Maiduguri, triggered “massive displacement”, and another attack two days later on nearby Monguno exacerbated the situation, the United Nations said.

ISWA’s renewed onslaught has also prompted the pullout of at least 260 U.N. aid workers from affected regions, the largest withdrawal since the humanitarian response scaled up in 2016, though some have started to return, the U.N. statement said.

The Boko Haram insurgency, which Buhari vowed to end when he took office in 2015, aims to carve out a purist Islamic state in northeastern Nigeria. It has forced about 2.7 million people to flee their homes since 2009 and killed around 30,000, creating one of the world’s worst humanitarian crises.

Boko Haram attacks in the run-up to the last election in 2015 weakened then-president Goodluck Jonathan and helped Buhari defeat him at the polls.