At least four people were killed and 20 injured when militants attacked a government office in the eastern Afghan city of Jalalabad on Sunday.
The attack triggered a gunbattle between the militants and security forces in a building housing the state accounts office, said Attahullah Khogyani, a spokesman for the governor of Nangarhar.
At least three explosions were heard at the start of what appeared to be a co-ordinated attack, he said.
Militants have staged several attacks across Afghanistan this year. Most have been in the capital Kabul, but in January gunmen attacked an office of aid group Save the Children in Jalalabad, killing at least five people and wounding 25.
In Sunday's attack, one militant blew himself up at the gate of the building in the centre of the city, allowing the others to enter, said Sohrab Qaderi, a member of the provincial council. More explosions were then heard coming from inside the building.
At least four attackers armed with rocket-propelled grenades and machine guns were fighting police, he said.
There was no immediate claim of responsibility.