ISLAMABAD, PAKISTAN - Local Islamic State affiliates have attacked and killed at least 18 government soldiers in eastern Afghanistan, officials confirmed Friday.

The deadly clash occurred in Dih Bala, a district in the border province of Nangarhar, where Afghan forces have recently launched a counter-IS offensive with American air support.

Provincial security sources said that a large group of IS loyalists staged the surprise assault against Afghan National Army outposts from three directions, which triggered heavy fighting that lasted for several hours.

Dih Bala, Afghanistan Dih Bala, Afghanistan Dih Bala, Afghanistan

At least eight Daesh fighters were also killed and 12 others wounded, the sources claimed, while confirming the death of 18 soldiers. Afghan officials use the Arabic acronym for the Middle East-based terrorist group.

Late Friday, Islamic State's media wing claimed the group carried out the attack, saying it killed the 18 Afghan soldiers.

Nangarhar borders Pakistan and is the only Afghan province where IS has succeeded in establishing its bases in several districts.

Pakistani officials said that IS is using its Afghan bases to plot deadly terrorist attacks on their soil, including Thursday's suicide bombing of a shrine in the southern Sindh province.

IS claimed responsibility for the violence that Pakistan officials say left around 90 people dead, including women and children, and wounded over 200.

Meanwhile, the United Nations Assistance Mission in Afghanistan, or UNAMA, has condemned the killing of 12 civilians in Thursday’s bomb blast in the southeastern province of Paktika on the Pakistani border.

Eight children were among the victims who were returning home from school for the weekend when their vehicle hit a roadside bomb, according to a UNAMA statement issued Friday.

The number of child casualties in Afghanistan rose by 24 percent last year, which marked the highest recorded civilian casualties since 2009 when UNAMA began systematically documenting such figures in the conflict-torn country.