Judges at the international criminal court have rejected a request by the court’s top prosecutor to open an investigation into war crimes and crimes against humanity in Afghanistan, a decision described as a “devastating blow for victims”.

In a lengthy written ruling, judges said any investigation and prosecution was unlikely to be successful because the expectation is that those targeted, including the United States, Afghan authorities and the Taliban, would not cooperate.

The decision could go some way towards easing the tension between the ICC and the Trump administration, which reacted with fury to chief ICC prosecutor Fatou Bensouda’s request to investigate potential war crimes by US soldiers in Afghanistan.

Last month the US secretary of state, Mike Pompeo, said Washington would revoke or deny visas to ICC staff seeking to investigate alleged war crimes and other abuses committed by US forces in Afghanistan or elsewhere. Bensouda said on 5 April that her US visa had been revoked.

Bensouda’s office implied it was not disappointed with the ruling, saying it would “further analyse the [court’s] decision and its implications, and consider all available legal remedies”.

But the ICC judges concluded that her “request establishes a reasonable basis to consider that crimes within the ICC jurisdiction have been committed in Afghanistan and that potential cases would be admissible before the court”.

One line of investigation the ICC prosecutors were following involved the CIA’s alleged mistreatment of detainees. The judgment said: “According to the prosecution, there is a reasonable basis to believe that, since May 2003, members of the US armed forces and the CIA have committed the war crimes of torture and cruel treatment, outrages upon personal dignity, and rape and other forms of sexual violence pursuant to a policy approved by the US authorities.”

Human Rights Watch said the decision was “a devastating blow for victims who have suffered grave crimes without redress”.

“The judges’ logic effectively allows states to opt-out on their obligation to cooperate with the court’s investigation,” said Param-Preet Singh, the organisation’s associate international justice director. “This sends a dangerous message to perpetrators that they can put themselves beyond the reach of the law just by being uncooperative.”

Jamil Dakwar, director of the American Civil Liberties Union, said: “It is outrageous that victims of war crimes are far less likely to get justice for well-documented atrocities because of the Trump administration’s authoritarian efforts to sabotage an investigation before it could even get started.

“The Trump administration’s bully tactics may have helped the United States skirt accountability this time, but the administration is playing a dangerous game that will inevitably come back to haunt the United States. No one except the world’s most brutal regimes win when we weaken and sabotage international institutions established to fight impunity and hold human rights abusers accountable.”

Katie Taylor, deputy director of the human rights organisation Reprieve, said: “Today’s decision will be a grave disappointment for survivors of war-on-terror era torture who have waited nearly two decades for justice.

“As yet another avenue for accountability closes, we must remember that in July 2018 the UK government pledged to announce within 60 days whether it would launch a judge-led inquiry with scope to investigate these abuses and others like them.

“It has been 285 days since that pledge was made, six months since that deadline was missed, and 18 years since many of these abuses took place. Survivors deserve better.”