WASHINGTON — Relations between American military trainers and specialists advising the Nigerian military in the fight against Boko Haram are so strained that the Pentagon often bypasses the Nigerians altogether, choosing to work instead with security officials in the neighboring countries of Chad, Cameroon and Niger, according to defense officials and diplomats.

Major rifts like these between the Nigerian and American militaries have been hampering the fight against Boko Haram militants as they charge through northern Nigeria, razing villages, abducting children and forcing tens of thousands of people to flee.

Secretary of State John Kerry is scheduled to travel to Nigeria on Sunday to meet with the candidates in Nigeria’s presidential elections, and the Pentagon says that the Nigerian Army is still an important ally in the region — vital to checking Boko Haram before it transforms into a larger, and possibly more transnational, threat.

“In some respects, they look like ISIL two years ago,” Michael G. Vickers, the undersecretary of defense for intelligence, told the Atlantic Council last week, using another name for the militant group known as the Islamic State. “How fast their trajectory can go up is something we’re paying a lot of attention to. But certainly in their area, they’re wreaking a lot of destruction.”