KABUL, Afghanistan — The army will take over security in the eastern city of Jalalabad, Afghanistan officials said Tuesday, hours after attackers overran a government refugee office there, killing 15 people. It was at least the 10th such assault on civilian targets this year.

The assault was part of a series of attacks attributed to the Islamic State against “soft targets” in or near the city of Jalalabad, where the extremists have been particularly active, mostly attacking civilians rather than confronting Afghan security forces.

Officials were so concerned that a decision was made to hand over security for the area to the Afghan National Army, beginning on Wednesday, according to Attaullah Khogyani, the spokesman for the governor of Nangarhar Province.

The attack on Tuesday began with two midday explosions outside the Department of Refugee Affairs, with several gunmen then entering the building and its compound, Mr. Khogyani said.