(WALL STREET JOURNAL) — ASADABAD, Afghanistan—Islamic State and the Taliban, after more than a year of fierce combat, have forged a patchwork cease-fire across much of eastern Afghanistan that has helped both insurgencies regroup and counter U.S.-backed efforts to dislodge them.

Until several months ago, Islamic State fought bloody battles with local Taliban units over fighters and territory in several provinces. The long-running Taliban insurgency has sought to stamp out its smaller rival, which only emerged in 2014. Afghan and U.S.-led coalition forces took advantage of the conflict, engaging the militants on multiple fronts to push them back and reclaim territory they held.

But recently, Afghan officials say, the two insurgencies have worked out local deals to stop fighting each other and turn their sights on the government. The upshot is that Islamic State has been able to focus on fighting U.S.- backed Afghan forces in Nangarhar province and shift north into Kunar province, establishing a new foothold in a longtime Taliban and former al Qaeda stronghold.

Note: Read our discussion guidelines before commenting.