KABUL, Afghanistan — After two years of heavy casualties, the Afghan military is trying to retake the initiative in the war against militants with a new offensive against Islamic State group loyalists, an assault that will see American troops back on the battlefield working more closely with Afghan soldiers.

Afghan President Ashraf Ghani recently announced a major assault against fighters loyal to the Islamic State group, who over the past year captured positions along Afghanistan's eastern border with Pakistan, mainly in Nangarhar province. That goal to uproot ISIS from Afghanistan has taken on new urgency in the wake of a deadly suicide bombing of a protest march Saturday in Kabul that killed at least 80 people.

The Islamic State group's Aamaq online news agency quickly claimed responsibility for the attack, the first ISIS attack in the Afghan capital and one of the deadliest ever to hit Kabul. Ghani, in a live televised address after the bombing, told the nation, "I promise you I will take revenge against the culprits."

The inexperienced Afghan forces have largely stalled in the fight against Islamic militants ever since most international combat troops withdrew in 2014. American forces that remained shifted to a supporting role and U.S. airstrikes diminished, letting the Afghan military take the lead in carrying out the war.

Taliban forces have dominated the battlefield and the Islamic State group has been building a foothold — and that has meant mounting losses among Afghan troops. Casualty numbers are not officially released, but according to figures provided by military officials, at least 5,000 troops were killed in 2014, rising to more than 6,000 last year. So far in 2016, Afghan troop deaths are 20 percent higher than the same point last year.

In an acknowledgment of the deteriorating security situation, President Obama last month gave a green light to a more assertive role for U.S. troops, though still short of direct combat. With that boost, Afghans are shifting back on the offensive.

The upcoming anti-ISIS operation announced by Ghani, dubbed Shafaq — or "Dawn" in Pashto — will see the head of U.S. and NATO forces in Afghanistan, Gen. John Nicholson, implementing an aggressive new strategy. U.S. airstrikes on Afghanistan are likely to become more frequent, as the strategy shifts from using airpower only to defend U.S. and NATO positions to striking in support of Afghan offensives.

× Fear of missing out? Sign up for the Early Bird Brief - a daily roundup of military and defense news stories from around the globe. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

In this Tuesday, July 19, 2016 photo, an Afghan soldier greeting to other soldier in Kabul-Jalalabad highway on the outskirts of Kabul, Afghanistan. After two years of heavy casualties, the Afghan military is trying to retake the initiative in the war against militants with a new offensive next week, an assault that will see American troops back working more closely with Afghan soldiers. (AP Photo/Rahmat Gul)

An Afghan soldier greets other soldiers on the Kabul-Jalalabad highway on the outskirts of Kabul, Afghanistan, on July 19, 2016.

Photo Credit: Rahmat Gul/AP

Nangarhar is one of Afghanistan's most economically important provinces, a major producer of agricultural goods and a thoroughfare for much of the country's exports to Pakistan and beyond.

"It is like a second capital," Afghan Army Gen. Shir Mohammad Karimi, the former general staff chief of operations, said of the provincial capital Jalalabad, 125 kilometers (76 miles) east of Kabul.

"It is a gateway to Kabul," he said. "If Nangarhar falls, Kabul will become a battleground every day."

Ghani has said the operation, expected to start before the end of this month, aims to eliminate IS fighters in Nangarhar, where they have been active mainly in the Shinwar, Kot and Achin districts. The ISIS loyalists are believed to be mostly disaffected Taliban fighters, as well as members of Pakistani insurgent groups, likely funded by IS in Iraq and Syria, Karimi said.

Obama's directives, issued in June, enable the U.S. military to work alongside Afghan forces in the field on offensive missions against insurgents, though still in a non-combat role. Since 2014, their role was confined to battles in which the Taliban directly threatened U.S. and NATO forces. They also allow U.S. involvement when Afghan forces face "strategic defeat," as they did in the northern provincial capital of Kunduz, which fell to the Taliban last September for several weeks and was threatened again in April.

In a further acknowledgement of the deteriorating security situation, Obama this month pledged to keep 8,400 troops in the country through 2017, delaying plans to reduce troop numbers to 5,500 by the end of this year. There are currently some 9,800 U.S. troops in the country.

Afghanistan's government and military also received a boost at NATO's summit in Warsaw this month, when the alliance agreed to fund Afghan forces through 2020.

In this Tuesday, July 19, 2016 photo, an Afghan soldier guards a checkpoint on the Kabul-Jalalabad highway on the outskirts of Kabul, Afghanistan. After two years of heavy casualties, the Afghan military is trying to retake the initiative in the war against militants with a new offensive next week, an assault that will see American troops back working more closely with Afghan soldiers. (AP Photo/Rahmat Gul)

An Afghan soldier guards a checkpoint on the Kabul-Jalalabad highway on the outskirts of Kabul, Afghanistan, on July 19, 2016.

Photo Credit: Rahmat Gul/AP

Over the last year, the Taliban have stepped up the fight, deploying more men and weapons than in previous years and expanding to new parts of the country, spreading Afghan forces thin. Their temporary seizure of Kunduz city and several districts unnerved the Afghan population. A Pentagon report to Congress in June said opinion surveys show that perceptions of security have hit "all-time lows" in Afghanistan. In March, 42 percent of those polled said they believe security is worse than during the time of the Taliban's brutal 1996-2001 rule.

In the past 18 months, Afghan military morale has been hit by a burgeoning belief that the Taliban are stronger, with corruption and desertion rates among government forces rising, officials have said.

Still, the militants have not had success in holding territory. And despite heavy fighting early in the year, levels of insurgent violence have been lower than many U.S. military officials had expected since the end of the fasting month of Ramadan in early July.

Visiting Afghanistan earlier this month, the chairman of the Joint Chiefs of Staff, Gen. Joe Dunford, credited the drop in violence to the improved capabilities and "offensive posture" of the Afghan forces. But he conceded the most intense period of the summer fighting season is only just beginning. Taliban attacks in northern Kunduz and neighboring Badakhshan provinces in the past week could mark the start of a new uptick.

Afghan military affairs analyst Jawed Kohistani said the comparatively subdued levels of Taliban activity was due to internal leadership squabbles following the killing of leader Mullah Akhtar Masood in a U.S. drone strike in May. Mansoor's replacement, the conservative cleric Haibatullah Akhundzada, is seen as a weak leader with limited access to funding. The Taliban's strategy under Akhundzada has not yet become clear.

One senior Western diplomat said the 2016 summer battle is not likely to be as ferocious as 2015, due to the boosted U.S. involvement. He spoke on condition of anonymity as he was not authorized to speak publicly on the issue.

According to the Western diplomat, the aim of the Afghan forces' more aggressive stance is to convince the Taliban they cannot win but should instead join a reconciliation process, beginning with direct contact with the Afghan government, possibly as early as fall.

Associated Press writer Rahim Faiez contributed to this report.