Attackers armed with machine guns, rocket launchers and suicide vests have opened fire on the main Afghan election commission headquarters east of Kabul.
The attack on Saturday occurred after the armed men entered a building in front of the commission headquarters, according to Al Jazeera sources in the area.
Four attackers died and two police officers were injured during the incident.
Afghan intelligence services told Al Jazeera on Saturday they had arrested 30 people planning attacks around the country.
They also said they had intelligence ahead of the attacks on the election commission headquarters and warned security services.
"I can confirm an attack at the IEC [Independent Election Commission] headquarters," Noor Mohammad Noor, the IEC spokesman, told AFP news agency. "We heard two explosions inside the IEC compound, the sound of firing is still ongoing, but people are safe and are in safe rooms."
The Taliban has claimed responsibility for the attack.
Al Jazeera's Qais Azimy, reporting from Kabul, said that Afghan police have surrounded the building where the attackers are, and are saying that the attack will soon be over.
There is no word on casualties yet.
Azimy also reported that Afghan security officials are "not surprised that the Taliban is putting all its force into disturbing the upcoming election, but now the big question to be answered at the polls next Saturday is what the turnout will be after all these attacks".
The attack comes one week ahead of voting. It is the fourth attack in the past eight days in Afghanistan, and the second attack targeting election offices in Kabul.
On Friday, Taliban fighters attacked a Kabul guesthouse used by a US anti-landmine charity, killing two people including a teenage girl.
The Taliban have vowed a campaign of violence to disrupt the polls on April 5, urging their fighters to attack polling staff, voters and security forces in the run-up to election day.
Source: Al Jazeera and agencies