KABUL, Afghanistan — Afghanistan's spy agency freed eight people who were among a large group of ethnic minority Hazaras kidnapped earlier this year, the agency said on Tuesday.

The five men, two women and a teenager were freed Tuesday in Ghazni province, the National Directorate of Security said in a statement.

The NDS said they were among 31 Hazaras abducted earlier this year, but gave no further details.

A group of 31 Hazaras, believed at the time to be men, were forced off buses in Ghazni in February. Of the abductees, 19 were freed in May and the rest remain unaccounted for.

Senior government officials said at the time that the Islamic State group was behind the abductions. The NDS statement made no comment on who was responsible, referring only to "terrorists."

Hazaras, who are predominantly Shiite, have been targeted in several large-scale kidnappings this year, prompting demonstrations and sit-ins in the capital Kabul and elsewhere.

The beheaded bodies of seven Hazaras were found in Zabul, neighboring Ghazni, on Saturday. The four men, two women and a child had been kidnapped up to six months ago, officials said.

The NDS dismissed Taliban claims that IS was responsible for the beheadings. Rival Taliban factions have been fighting in the region for days.

The bodies were being transported from Ghazni to Kabul, ahead of a demonstration planned for Wednesday near the presidential palace, according to an organizer, Daud Naji.

About 100 people gathered in a Kabul park on Tuesday demanding a day of mourning for the Zabul victims.

President Ashraf Ghani condemned the killings and vowed to track down the perpetrators.

As fighting between Taliban factions continued for a fourth day in Zabul, officials said the two sides appeared to be using suicide bombers against each other.

The two Taliban factions are split over the question of the extremist group's leadership. Mullah Akhtar Mansoor was declared the new leader in July after it was announced that Taliban founder Mullah Mohammad Omar has been dead for at least two years. But a breakaway Taliban faction is backing Mullah Mohammad Rasool, and both Rasool's faction and Afghan officials say that loyalists to the Islamic State group are siding with Rasool's fighters.

The spokesman for the Zabul governor, Islam Gul Sayal, said that two suicide attacks took place early Tuesday in the Khaki Afghan district. He said that one suicide bomber accidently detonated himself, killing 22 IS loyalists and wounding another 10.

About an hour later, another suicide attack targeted gunmen loyal to Mansoor, killing the Taliban's shadow provincial governor Mullah Matiullah and the group's head of provincial military affairs Peer Agha, Sayal said.