ISLAMABAD — Afghan rights workers warned Tuesday that a blistering U.S. attack on the International Criminal Court investigating war crimes allegations will strengthen a climate of impunity in Afghanistan, prolong the war and embolden those committing acts of violence.

In a speech Monday, U.S. National Security Adviser John Bolton said Washington would not cooperate with The Hague-based court and threatened it with sanctions, saying it put U.S. sovereignty and national security at risk.

The CIA and U.S. forces have been accused of committing war crimes in Afghanistan.

"It's very unfortunate because delivering justice to victims will help to facilitate the peace process in Afghanistan," said Sima Samar, head of Afghanistan's Human Rights Commission. "Justice is not a luxury. It is a basic human right."

In The Hague, the ICC said it will continue to do its work "undeterred," despite Bolton's condemnation.

The court said in a statement that it was established by a treaty supported by 123 countries. It says it prosecuted cases only when those countries failed to do so or did not do so "genuinely." Afghanistan is a signatory.

During a three-month period that ended in January, the court received a staggering 1.7 million allegations of war crimes from Afghanistan, although some of those accusations involved entire villages.

Still, thousands of individual statements as well as those filed on behalf of multiple victims were received by the ICC in The Hague. The statements were collected by organizations based in Europe and Afghanistan.

Bolton's speech came as an ICC judge was expected to announce a decision soon on a request from prosecutors to formally open an investigation into allegations of war crimes committed by Afghan national security forces, Taliban and Haqqani network militants as well as U.S. forces and intelligence officials in Afghanistan since May 2003.

While the Bolton speech "was shocking in many parts," Washington was not expected to embrace the investigation, said Amal Nasser, permanent representative of the International Federation of Human Rights to the ICC.

Still, "the ICC prosecutor has not hesitated before in demonstrating that it will prosecute major powers," Nasser said.

"I think what the U.S. is promoting is a sense of the 'righteousness' and being above the law," she said in an email interview, noting the ICC has yet to decide whether there will be an investigation or its scope.

The 181-page prosecution request, dated November 2017, said "information available provides a reasonable basis to believe that members of United States of America armed forces and members of the Central Intelligence Agency committed acts of torture, cruel treatment, outrages upon personal dignity, rape and sexual violence against conflict-related detainees in Afghanistan and other locations, principally in the 2003-2004 period."

Washington's unequivocal rejection of the court seems likely to embolden Afghanistan's U.S.-backed government, which refused Tuesday to respond directly to Bolton's outburst, but similarly dismissed war crimes allegations against Afghan National Security Forces as well as its intelligence agency.

President Ashraf Ghani's deputy spokesman, Shahussain Murtazawi, said the Taliban, the Islamic State group affiliate and as many as 21 other anti-government groups have committed war crimes. He dismissed allegations against Afghan security forces, saying "government forces are always trying to save the people. It is the insurgents who are the killers of civilians."

The prosecutor's request says there is "a reasonable basis to believe that members of the Afghan National Security Forces (ANSF), in particular members of the National Directorate for Security (NDS) and the Afghan National Police (ANP), have engaged in systemic patterns of torture and cruel treatment of conflict-related detainees in Afghan detention facilities, including acts of sexual violence."

For human rights activists in Afghanistan, Bolton's assault dealt a punishing blow to their efforts to end a culture of impunity that has hampered efforts to bring those who committed crimes to justice.

"The solution to put an end to war is by making everyone accountable, whether it is the Taliban or the Haqqani network or whether it is the Americans or the Afghan army or Afghan government," said Ehsan Qaane, of the Kabul-based Transitional Justice Coordination Group, which represents 26 organizations working in Afghanistan.

The coordination group helped many who wanted to file a claim with the international court.

Victims need to see justice done if they are to begin to heal, Qaane said. He added that some insurgents turned to the Taliban after being detained, tortured and released. Their fight is more about revenge than ideology, he said.

"These people will perhaps stop fighting if they feel they have justice," Qaane said.

Samar said rights groups cannot dispense justice.

"There is a difference between a human rights defender and a judge," thus the need for the ICC, she said in a telephone interview. "My concern is that to deny justice is to deny a basic human right and human dignity."