There was no immediate claim of responsibility for the raid
Gunmen attacked an education department office in the eastern Afghan city of Jalalabad on Wednesday and held out against security forces for some four hours before the assault ended with at least 10 people killed, officials said.
As the attack ended, the provincial governor's spokesman Attaullah Khogyani said the casualties included 10 people wounded.
He said there were three attackers, two of whom detonated suicide-bomb vests, while the third was shot by security forces.
It was the third major attack in less than two weeks in Jalalabad, the main city of Nangarhar province, following a blast that killed a group of Sikhs on July 1 and a second that killed at least 12 people on Tuesday.
With Nato member countries meeting in Brussels, the attacks have underscored the instability in much of Afghanistan where the Nato-led Resolute Support mission has been training and advising Afghan forces.
This year, backed by intensive US air strikes, Afghan forces have claimed success in holding the Taliban back from major cities and US commanders say they have been hitting other militant groups like Islamic State hard.
But attacks on civilian targets have continued, causing heavy casualties.
Officials in Washington have told Reuters that President Donald Trump has been frustrated with the lack of progress and is expected to launch a review of the US strategy.
There was no immediate claim of responsibility for Wednesday's attack but both of the other assaults in the city this month were claimed by Islamic State, which is opposed to both the Western-backed government in Kabul and the Taliban.
The attack on the education department appeared to follow the pattern of previous attacks including an assault on an office of the Save the Children aid group in Jalalabad in January and another on the city accounts office in May.
Nangarhar province, on the porous border with Pakistan, has become a stronghold of Islamic State, which has grown into one of Afghanistan's most dangerous militant groups since it appeared around the beginning of 2015.
On the other side of the country, in the western province of Farah, four people were killed and three wounded when their car set off a roadside bomb as they were travelling to a wedding, a provincial official said.