Afghanistan’s main intelligence agency says it has released two activists who helped expose an alleged pedophile ring operating in the country's schools, a scandal that has sparked national outrage.



The National Directorate of Security (NDS) has come under fire for arresting last week the two human rights defenders -- Musa Mahmudi and Ehsanullah Hamidi -- who gave interviews about the purported pedophile ring.



The NDS said on November 27 that it had handed over the two men to the Afghanistan Independent Human Rights Commission (AIHRC).



In a statement, the AIHRC confirmed it had received Mahmudi and Hamidi and said their release was a "step towards strengthening democracy and institutionalizing human rights values" in the war-torn country.



The rights group called for the creation of a "competent and independent body" to investigate and document the alleged sexual abuse cases at schools in Logar Province, south of Kabul.

Afghan President Ashraf Ghani said a day earlier that he had ordered an investigation into the situation and criticized the NDS.



In a series of tweets, Ghani said he was "deeply disturbed about the recent reports on sexual abuse" in schools in Logar Province, south of Kabul, and that he instructed the Education Ministry to provide him with a “thorough report” on the matter "ASAP."



The British newspaper The Guardian earlier this month reported that at least 546 boys from six schools have allegedly been abused by a pedophile ring involving teachers and local officials.

The NDS on November 26 described the Guardian report as "baseless" and said Mahmudi's claims in the article were part of a scheme aimed at securing asylum in a foreign country.



But Ghani said he had instructed the intelligence agency to "stop the proceedings" against Mahmudi and Hamidi, adding: “The protection of civil society and human rights defenders is the sole responsibility of the security forces.”



The AIHRC expressed deep concern about the detention of the two activists, calling it a “clear contradiction of national laws and human rights standards.”



London-based Amnesty International had also called for their immediate release, saying the authorities should hold the suspected perpetrators of “these horrific crimes” accountable, rather than punishing Mahmudi and Hamidi for speaking out against them.

John Bass, the U.S. ambassador to Afghanistan, said he was "deeply disturbed by these Soviet-style tactics” of the NDS.

The ancient practice of "bacha bazi" -- literally, dancing boys -- is common in Afghanistan among wealthy and powerful men who exploit underage boys as sexual partners.

"Successive Afghan governments have failed to seriously investigate cases of child sexual abuse by police and government officials. These abuses continue even though Afghanistan’s new penal code, which came into force in 2018, criminalizes the sexual abuse of boys," Human Rights Watch (HRW) said on November 27.



"Impunity for child rape thrives because very often the perpetrators are powerful men in the military, police, or other official institutions," said Bede Sheppard, deputy director of the New York-based watchdog's Children's Rights Division.