The Islamic State army’s unleashing of terror bombings and assassinations in Iraq last year is being played out by insurgents in Afghanistan who want to intimidate and destroy local forces as American troops exit.

In late 2012 the Islamic State, anchored in Syria and with cells in northern and western Iraq, launched a campaign of terror. Its brutal strategy centered on detonating vehicle-born improvised explosive devices (VBIEDs) in crowded areas and killing local government and military leaders.

Analysts see the same type of campaign from the Taliban and the allied Haqqani network viciously unfolding. Ten days ago, for example, a suicide bomber struck an army bus in Kabul, killing seven Afghan soldiers.

“The parallel of what was going on in the end of 2012 to the middle of 2013 in western Iraq and northern Iraq that set the conditions for the collapse of Iraqi Security Forces — those patterns are starting to emerge in Afghanistan,” said retired ArmyLt. Gen. James Dubik, an analyst at Washington’s Institute for the Study of War.

“The frequency, the lethality and the complexity of attacks in Kabul and in [the] east are disturbing,” he said. “These are attacks to either intimidate or kill leaders in the Afghan National Security Forces.” Are the Islamic extremist Taliban and Haqqani network, a family-led group of assassins who focus on bringing death and destruction to Kabul, copying the Islamic State?

“The tactics are similar, but then again, terror and assassination and intimidation are common to almost all insurgencies,” Mr. Dubik said. “I would only make the minimum claim that ISIS, al Qaeda, Haqqanis, Taliban and their ilk all learn from each other.”

Precise casualty figures for the Afghan army and police are somewhat elusive compared with the strict procedural count for U.S. and allied service members. But there is no doubt that the Taliban and Haqqanis have been killing more ANSF members over the past two years, attacking the police in particular.

ArmyGen. John Campbell, the overall allied commander, said that of the 350,000-strong ANSF, 7,000 to 9,000 have been killed or wounded this year alone, an increase from 2013.

Earlier this year, the Afghan government issued revised fatality figures that also showed a big jump for its troops.

The increase is explained partly by the fact Afghans are taking the lead in military operations as U.S. troop strength, once at 100,000, will shrink to 9,800 by year’s end. By the end of 2016, all troops will be out, according to a schedule announced by President Obama, who said, “It’s time to turn the page.”

Analysts see a concerted enemy effort to prepare for a planned takeover of Kabul by whittling down the ANSF day in and day out.

“As we start departing from certain areas, the Taliban, Haqqani group, any insurgent groups, are going to start probing into real or perceived power vacuums — areas where we are departing — and they’re going to test the Afghan security forces to see how stout they are going to be,” said Jason Campbell, an analyst at the Rand Corp.

“As a result of this the last couple of months,” said Mr. Campbell, who served as an adviser to the NATO command, “we’re seeing insurgent groups, instead of taking pot shots, in some cases two or three hundred fighters at a time attacking fixed positions, not just hitting and running.”

This change was underscored in February, when the Taliban overran an army base in eastern Kunar province, bordering Pakistan, and killed 21 Afghan soldiers, some in their bunks. It was one of the Afghan army’s worst casualty days since its inception.

Mr. Campbell said the ANSF has performed well in some attacks by hundreds of Taliban and not so well in others, as the Kunar invasion illustrated.

Mr. Campbell said “there’s absolutely truth” to the analysis that the enemy in Afghanistan today is doing what the group then known as ISIL did in Iraq in 2012-2013.

“They are indeed shaping the battlefield for a time when the coalition is completely out of Afghanistan,” he added.

Gen. Campbell spoke to the Pentagon press corps on Oct. 2 and declared, “The last couple of weeks, there has been an uptick with the Taliban trying to make a statement as they close out the fighting season.”

He reported a “big spike” in Afghan deaths the “last couple of weeks” due to heavy fighting in Helmand province, the Taliban’s birthplace, where they are trying to take back villages.

“The Taliban may take over a district center or something, but only temporarily,” Gen. Campbell said. “Once the ANSF understands that piece of it [and] they go after that, they get the terrain back.”

A year ago, Marine Gen. Joseph Dunford, Gen. Campbell’s predecessor, was less sanguine when talking about the ANSF’s burgeoning fatality rate, which had reached 100 deaths per month.

“I’m not assuming that those casualties are sustainable,” he told The Guardian newspaper.