Afghanistan's spy agency says it has freed eight people who were among a large group of ethnic minority Hazaras kidnapped earlier this year.

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

It was not clear if they were among 31 Hazaras abducted from a bus in Ghazni in March, all of whom were believed to be men.

Senior government officials have said that the Islamic State group was behind the abductions. The NDS statement made no comment on who was responsible.

The bodies of seven Hazaras were found in neighboring Zabul province on Saturday, officials said. Rival Taliban factions have been fighting in the region for days.