At least one suicide bomber and several gunmen have attacked a government building in eastern Afghanistan, wounding 12 people, including a child and a woman, officials say.

Attackers detonated explosives outside the building in Jalalabad, the capital of the eastern province of Nangarhar, said Ataullah Khogyani, the provincial governor's spokesman and a provincial council member.

Khogyani added that fighting was ongoing.

'Security forces are in the area to rescue the staff' at the electronic identification registration center, said Khogyani.

No one immediately claimed responsibility for the attack, but both Taliban and Islamic State group are active in eastern Afghanistan.

Militant attacks have continued as Afghanistan prepares for a presidential election later this month, while U.S.-Taliban talks over a peace deal have collapsed.