Afghanistan’s attorney general has launched an investigation into the alleged abuse of more than 500 schoolboys, following the discovery of a paedophile ring in the country’s Logar province.

Jamshid Rasooli, a spokesman for the attorney general’s office, said a committee had been appointed. “We are in the process of running a comprehensive, impartial investigation,” he said.

No date has been set for the release of the committee’s findings, but the closure of schools over the winter months might cause delays.

The move follows the discovery by civil society organisation the Logar Youth, Social and Civil Institution of more than 100 videos posted to a Facebook page showing the alleged abuse of boys in six schools by teachers, headteachers and others in authority. The page has since been removed.

The Guardian’s report on the abuse led to a national debate on child abuse involving members of parliament and civil society, and an international outcry. Afghanistan’s Ministry of Education launched an urgent investigation.

The president’s spokesperson Sediq Sediqqi said the ministry is drafting a school security plan to deal with multiple issues, including child abuse, as well as reviewing how schools deal with reports of abuse.

“The teacher’s professional code of conduct has additionally been revised and the approaches to deal with child abuse and gender-based violence have been incorporated,” Seqiqqi said.

Activists Mohammad Mussa Mahmoudi and Ehsanullah Hamidi, who exposed the abuse, have left Afghanistan with their families for safety reasons.

Both had been receiving threats for months before they publicised their research and were detained by the country’s intelligence services, the National Directorate of Security, for several days before being released after publicly denying their findings.

At the time the former US ambassador John Bass tweeted that such “Soviet-style” tactics of coercing confessions were “appalling”.

The European Parliament has commended the work of Mahmoudi and all human rights defenders in Afghanistan, calling for the investigation to be “conducted in cooperation with international bodies including Unama (the UN assistance mission in Afghanistan), and in full transparency.”

“This is one of the most dangerous moments to be a human rights activist in Afghanistan,” said Omar Waraich, deputy south Asia director at Amnesty International. “Not only do they operate in one of the most hazardous environments, but they face threats from both the government and armed groups.

“The Afghan government has a duty to respect, protect and support activists, to investigate threats and attacks against them, and to hold suspected perpetrators accountable,” he said.

Following publication of the research, UN agencies and NGOs said they would provide better protection to children in Logar and offer psychological support to survivors of abuse.

“Resources have been made available to help children, and things are moving in a positive direction but much work needs to be done to address these issues across the country,” said the director of one NGO working on child protection in Afghanistan, who wished to remain anonymous.

The director said one problem was the lack of female social workers in Afghanistan as many of the boys who had been abused might not feel comfortable speaking to men.

Abuse of boys in Afghanistan – often referred to as bacha bazi (literally, “boy for play”) – is widespread, but rarely talked about, as survivors often fear speaking up could lead to retribution or bring shame to their families.

“There’s a global culture of shame of the abused that is misplaced and it often comes out as denial. This is not unique to the Afghanistan context,” said Shaharzad Akbar, chairperson of the Independent Human Rights Commission. “There’s also a terrible culture of moving people with allegations to different offices or provinces as a form of ‘punishment’.”

Several families in Logar and activists linked to the Logar Youth, Social and Civil Institution have left the province for security reasons.