Twin explosions tore through a demonstration by members of Afghanistan's Hazara minority in Kabul on Saturday, killing at least 80 people and wounding more than 230 in a suicide attack claimed by Daesh.
Graphic television footage from the site of the attack showed many dead bodies lying on the bloodied road, close to where thousands of Hazara had been demonstrating against the route of a planned multi-million-dollar power line.
"Two fighters from Daesh detonated explosive belts at the gathering in the city of Kabul in Afghanistan," said a brief statement on the group's Amaq news agency.
Officials in Afghanistan's main intelligence agency, the National Directorate for Security (NDS), said the attack was planned by an individual named Abu Ali.
They said three bombers were involved in the attack.
The Persian-speaking Hazara, estimated to make up about 9 per cent of the population, are Afghanistan's third-largest minority but they have long suffered discrimination, and thousands were killed during the period of Taliban rule.
"We were holding a peaceful demonstration when I heard a bang and then everyone was escaping and yelling," said Sabira Jan, a protester who witnessed the attack and saw bloodied bodies strewn across the ground. "There was no one to help."
The attack succeeded despite tight security which saw much of Kabul city centre sealed off before the demonstration, with stacks of shipping containers and other obstacles and helicopters patrolling overhead.
An Interior Ministry statement said 80 people had been killed and 231 wounded, with local hospitals straining to cope with those being brought in.
The worst previous attack against the Hazara was in December 2011, when more than 55 people were killed in Kabul.
President Ashraf Ghani declared a national day of mourning and vowed revenge, while the top UN official in Afghanistan, Tadamichi Yamamoto, condemned the attack as a war crime.
The United States and Russia condemned the attack and renewed pledges of security assistance to Kabul.
"We remain committed to work jointly with the Afghan security forces and countries in the region to confront the forces that threaten Afghanistan's security, stability, and prosperity," the White House said in a statement.
Russian President Vladimir Putin reiterated his "readiness to continue the most active cooperation with Afghanistan in fighting all forms of terrorism", Russian news agencies quoted a Kremlin statement as saying.
Saturday's demonstrators had been demanding that a 500 kV transmission line from Turkmenistan to Kabul be re-routed through two provinces with large Hazara populations, saying they feared being shut out of the project.
The government said the project guaranteed ample power to the provinces, Bamyan and Wardak, which lie west of Kabul, and that altering the planned route would delay it by years and cost millions of dollars. But the resentment felt by many Hazaras runs deeper than simple questions of energy supply.