The attack occurred two weeks after a suicide bomber struck a voter registration office in Kabul, the capital, killing at least 57 people. The Islamic State in Afghanistan claimed that attack; Taliban insurgents denied any responsibility for it.
The Taliban also denied any role in the attack on Sunday.
Voter registration began on April 14, after voting cards issued in previous elections were invalidated because of widespread forgery. Citizens must now go to registration centers to have their national identity documents stamped to show that they can vote in the elections for the national parliament, planned for October.
The elections are three years behind the schedule mandated by the Afghan Constitution. A disastrous and disputed presidential election in 2014 led to widespread disagreement among political parties about how to conduct elections, both for Parliament this year and for presidency in 2019.
Voter registration has proceeded very slowly, according to officials. In addition to the attack on a registration center in Kabul on April 22, there have been at least four other attacks reported on registration centers or officials since the voter drive began.
Maliha Hassan, an election commissioner, said that 1.2 million Afghans had registered to vote so far, out of what is believed to be 14 million who are eligible. The registration process ends June 15, which, at the current rate, would leave most Afghan voters unregistered.