The bomber was on foot when he detonated his explosives at the gate of the building about 10 a.m. local time, Interior Ministry spokesman Najib Danish said.

ISIS claimed responsibility for the bombing, in a statement distributed through Telegram. ISIS said "our martyrdom brother" targeted a group of Shiite people outside the voter registration center in the Dashte Barchi neighborhood.

Resolve for 'fair and transparent election'

In a message posted to Twitter, the nation's chief executive Abdullah Abdullah condemned the attack.

"I stand with those affected by this coward attack. Our resolve for fair and transparent election will continue and terrorists won't win against the will of the Afghan people," Abdullah said.

I strongly condemn the terrorist attack on voters' registration center in Kabul. I stand with those affected by this coward attack. Our resolve for fair and transparent election will continue and terrorists won't win against the will of the Afghan people.

President Ashraf Ghani said the Kabul attack and another reported in Pul-e-Khumri were "heinous terrorist attacks."

"I wish Allah's mercy upon those who martyred, speedy recovery to the wounded, and convey my deep condolences to victims' families. I instructed relevant institutions to provide support and care to those affected," Ghani said on Twitter.

US Ambassador John Bass said the Kabul attack was "senseless."

In a statement posted on Twitter, Bass said: "I strongly condemn this morning's suicide attack on a voter registration center in #Kabul and offer my condolences to the victims and their families. This senseless violence shows the cowardice and inhumanity of the enemies of democracy and peace in #Afghanistan."

I strongly condemn this morning's suicide attack on a voter registration center in #Kabul and offer my condolences to the victims and their families. This senseless violence shows the cowardice and inhumanity of the enemies of democracy and peace in #Afghanistan. pic.twitter.com/a2Y5oNN1m7