MAIDUGURI, Nigeria (Reuters) - Nigeria has named its fourth commander in 14 months to lead the fight against the Islamist Boko Haram insurgency, a move sources say comes after a series of embarrassing military defeats.

The reverses could hurt President Muhammadu Buhari’s chances of re-election in Feb. 2019. He campaigned in 2015 vowing to end the insurgency but the war is entering its 10th year and the humanitarian crisis it has spawned show little sign of ending.

The appointment of Major General A.M. Dikko is “aimed at injecting new hands to further actualize the vision of the Chief of Army Staff, Lieutenant General Tukur Yusufu Buratai,” an army spokesman said in a statement. It did not say what had happened to Rogers Nicholas, the commander since December.

The shake-up comes after victories for Boko Haram and Islamic State West Africa, which splintered from the former militancy in 2016, according to four military officials who spoke on condition of anonymity because they were not permitted to speak to media.

Buratai, Nigeria’s army chief, “wasn’t happy” about recent attacks in the states of Borno and Yobe earlier this month, said one of the officials.

“We lost quite a number of soldiers and equipment in Yobe,” they said. “The attack was an embarrassment to the chief... He seems to believe there were apparent lapses in the strategies in the theater.”

Another military official said Buratai is “fed up with recent developments”, while a third said the army has been “having problem with our operations. We’ve lost many soldiers in recent times.”

The government has been saying since December 2015 that Boko Haram has been “technically defeated”. Yet attacks continue in the northeast while Islamic State West Africa holds territory around Lake Chad.

Elsewhere, violence between semi-nomadic cattle herders and settled farmers has killed around six times more people than deaths related to Boko Haram in the first half of 2018 and threatens national stability, the International Crisis Group (ICG) said.