A suicide bomber blew himself up outside a voter registration centre in the Afghan capital Kabul on Sunday, killing at least 57 people and injuring more than 100, in the most serious attack yet on preparations for elections scheduled for October.
Islamic State claimed responsibility for the attack on a project of key importance to the credibility of President Ashraf Ghani's government, which has been under international pressure to ensure long-delayed parliamentary polls take place this year.
Interior Ministry spokesman Najib Danesh said a bomber on foot approached the centre where officials were issuing identity cards as part of the registration process for around 10 million voters across Afghanistan. Registration began this month.
President Ghani issued a statement condemning the attack and said it "cannot divert us from our aims or weaken this national democratic process".
A spokesman for the ministry of public health said at least 57 people, including eight children, were confirmed dead and 119 wounded, but the total could still rise.
The explosion destroyed cars and shattered windows in nearby buildings, leaving rubble strewn across the blood-stained street.
It was the deadliest blast in Kabul since about 100 people were killed in January by a bomb concealed in an ambulance, and it came after repeated warnings that militants could try to disrupt the election process.
Acting U.S. Secretary of State John Sullivan condemned the attack, saying it exposed "the savagery and inhumanity of terrorists."
Tadamichi Yamamoto, the senior United Nations official in Afghanistan, said the attack appeared to be an effort "to deter Afghan citizens from carrying out their constitutional right to take part in elections."
After weeks of relative calm, the blast took place in Dasht-e Barchi, an area of western Kabul inhabited by many members of the mainly Shi'ite Hazara minority, which has been repeatedly hit by attacks claimed by Islamic State.
"There were women, children. Everyone had come to get their identity cards," said Bashir Ahmad who had been near the blast, which occurred despite heightened security after the January attack.
According to U.N. figures, more than 750 people have been killed or maimed in suicide attacks and bombings by militant groups during the three months to March ahead of an expected start of the Taliban's usual spring offensive.
Afghanistan's international partners have insisted that the elections should be held this year before a presidential vote due in 2019, although there has been widespread scepticism that they will go ahead.
More than 7,000 voter registration centres have been set up across Afghanistan to handle about 10 million registrations in a process that has been repeatedly disrupted by technical and organisational problems.
Officials had pledged tight security to ensure the process, which will be vital to ensuring a ballot broad-based enough to be accepted as legitimate, proceeded safely. But those caught by Sunday's attack voiced frustration at what many Kabul residents see as government shortcomings in securing the capital.
"They should be keeping the country safe, if they can't, someone else should be in their place," said Sajeda, who was wounded in the blast along with three other members of her family as they lined up for their cards.
The voter registration process, designed to reduce the electoral fraud that has marred past ballots, began this month but there have already been several security incidents.
On Sunday, a roadside bomb near a registration centre in the northern city of Pul-i Khumri killed six members of a family and wounded three, although there was no indication that the incident was directly linked to the Kabul attack.
Last week, two police officers in the eastern city of Jalalabad were killed outside a voter registration centre, while a voter centre in the central province of Ghor was burned down last week and electoral officials briefly abducted.
The vote could be postponed to next year if registration of voters, many of whom do not have national identity cards, is not completed before winter sets.
Parliament is still sitting three years after its term officially expired and further delays would seriously weaken already fragile confidence in the political system.
There was an additional scare on Sunday when a NATO military convoy in Kabul accidentally hit and injured a child and triggered a protest that police dispersed by firing into the air. A NATO spokesman said the child had been taken to hospital and was in a stable condition.