The so-called Islamic State terror group claimed credit for a bomb attack in Kabul Saturday that killed at least 80 people and wounded hundreds of others during a mass protest rally.

A website linked to the Islamic State terror group claimed responsibility for the violence. A statement said the attack was meant to warn Afghanistan's ethnic Hazaras, who are mostly Shiite, to stop joining the Syrian government in its fight against the terror group.

An Afghan interior ministry statement says three suicide bombers assaulted the peaceful demonstrators. It said one of them detonated his device among the protesters, one mistakenly killed only himself while a third was shot dead by security forces guarding the rally.

The attack occurred as thousands of ethnic Hazaras marched through the streets to demand a planned power line be rerouted through their poverty-stricken central province of Bamiyan. But the group was likely targeted because they are mainly Shiite.

An Afghan woman weeps at the site of a suicide attack in Kabul, Afghanistan July 23, 2016.

Rights groups and analysts have accused Iran of covertly recruiting and training men from nearly three million Afghan refugees it hosts, including around one million registered refugees, and sending them to Syria to fight alongside government forces.

Ahead of Saturday's rally in Kabul, authorities had blocked main roads to prevent protesters from reaching the city’s center or the presidential palace. The measures severely restricted movement, forcing shops and businesses to close. It also hampered the ability of rescue workers to reach victims of the attack.

Thousands of demonstrators march towards the center of Kabul, Afghanistan, Saturday, July 23, 2016.

President Ashraf Ghani condemned the violence as the work of “terrorists and opportunists”, saying the government put in place measures to provide security for the protesters.

“But terrorists entered the protests, and carried out explosions that martyred and wounded a number of citizens including members of security and defense forces,” he said.

Afghan officials are expected to address a news conference to discuss details of the carnage. Pakistan's foreign ministry and the U.S. embassy in Kabul each released statements condemning the attack.

Amnesty International said the bombing of a peaceful protest demonstrated “the utter disregard that armed groups have for human life.”

In May, the Hazara community organized a similar mass demonstration against the current route of the multi-million-dollar regional electricity line involving Turkmenistan, Uzbekistan, Tajikistan, Afghanistan and Pakistan. The original plan was to route the so-called TUTAP line through Bamiyan, a mostly Hazara region.