The Islamic State has laid improvised explosives along a major highway north of Baghdad, revealing for the first time how the militant group is seeking to defend territory it controls from counterattack, U.S. defense officials said on Thursday.

U.S. officials described Iraqi forces’ struggle to clear the explosives and advance into contested areas around the strategic Baiji oil refinery as the start of what they expect will be a years-long endeavor to break the Islamic State’s hold on a vast area across Iraq and Syria.

“We’re seeing now . . . how they defend,” a U.S. military official said. “We got a good lesson on how they attack, but how they defend — we’re getting a good lesson in now.” […]