A suicide attacker on foot blew up near a vehicle as it entered the head office of Afghanistan's Independent Election Commission (IEC) on Monday, wounding at least six people, officials said.
There was no immediate claim of responsibility for the attack, which comes as thousands of ballot boxes from around the war-torn country are delivered to the IEC's heavily fortified compound in the Afghan capital following chaotic and violent legislative elections.
Four IEC workers and two police officers were wounded when the militant blew up near a vehicle entering the base at 8:00 am (0330 GMT).
The attacker was "identified and gunned down by police before reaching his target", Kabul police spokesman Basir Mujahid told reporters.
"The wounded were taken to hospital and are in a stable condition."
Millions of Afghans risked their lives to vote in the long-delayed elections that were held over two weekends.
The ballot, which the Taliban had vowed to attack, was marred by lengthy delays at polling centres, allegations of fraud, and deadly violence, with hundreds killed or wounded in scores of attacks.
IEC figures suggest around half of the nearly nine million people registered to vote actually cast a ballot.
Many suspect a significant number of those on the voter roll were based on fake identification documents that fraudsters planned to use to stuff ballot boxes.
The parliamentary election, which was more than three years late and the third since the fall of the Taliban in 2001, is seen as a dry run for next year's presidential vote.
It is also considered an important milestone ahead of a UN meeting in Geneva next month where Afghanistan is under pressure to show progress on "democratic processes".
More than 2,500 candidates, including mullahs, journalists and sons of warlords, are competing for 249 seats in the lower house.
With vote counting under way, the IEC is scheduled to release preliminary results on November 10.
But problems with untested biometric verification devices and missing or incomplete voter rolls are likely to trigger debate over which votes are valid.
The Electoral Complaints Commission has received thousands of complaints following three days of voting in 33 out of 34 provinces.
On Saturday voters in Kandahar, the southern birthplace of the Taliban and a province notorious for ballot stuffing, went to the polls.
While preparations had been "better" in Kandahar compared with the previous weekend, hiccups with biometric devices and voter lists persisted.
Voting in the province bordering Pakistan was postponed following the October 18 assassination of General Abdul Raziq, an anti-Taliban strongman seen as a bulwark against the insurgency in the south, amid fears of violence flaring up.
Raziq was among three people killed in a brazen insider attack on a high-level security meeting in Kandahar city that was attended by General Scott Miller, the top US and NATO commander in Afghanistan.
Miller escaped unhurt, but US Brigadier General Jeffrey Smiley was among 13 people wounded in the shooting claimed by the Taliban.
Kabul, Afghanistan | AFP