THE HAGUE, NETHERLANDS -- Appeals judges at the International Criminal Court gave the green light Thursday for prosecutors to open an investigation targeting the Taliban, Afghan forces and U.S. military and intelligence personnel for war crimes and crimes against humanity.

The global court upheld an appeal by prosecutors against a pretrial chamber鈥檚 rejection in April last year of Prosecutor Fatou Bensouda鈥檚 request to open a probe in Afghanistan.

Pretrial judges last year acknowledged that widespread crimes have been committed in Afghanistan, but rejected the investigation saying it wouldn鈥檛 be in the interests of justice because the likely lack of cooperation meant convictions would ultimately be unlikely.

That decision drew fierce criticism from human rights organizations who said it neglected the desire of victims to see justice in Afghanistan and effectively rewarded states that refused to cooperate with the Hague-based court.

Even though an investigation has now been authorized, it remains to be seen if any suspects eventually indicted by prosecutors will appear in court in The Hague 鈥 both Afghanistan and the United States have strongly opposed the investigation and the U.S. government refuses to cooperate with the global court.

At a hearing in December, prosecutors argued that pretrial judges at the global court overstepped their powers in April last year when they refused to authorize an investigation. The appeals judges agreed.

鈥淭he Appeals Chamber considers it appropriate to amend the appealed decision to the effect that the prosecutor is authorized to commence an investigation into alleged crimes committed on the territory of Afghanistan since May 1, 2003, as well as other alleged crimes that have a nexus to the armed conflict in Afghanistan,鈥 Presiding Judge Piotr Hofmanski said.

After a preliminary probe in Afghanistan that lasted more than a decade, Bensouda asked judges in November 2017 to authorize a far-reaching investigation.

She said there is information that members of the U.S. military and intelligence agencies 鈥渃ommitted 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.鈥

She also said the Taliban and other insurgent groups have killed more than 17,000 Afghan civilians since 2009, including some 7,000 targeted killings, and that Afghan security forces are suspected of torturing prisoners at government detention centers.

Thursday鈥檚 ruling comes days after an ambitious peace deal was signed by the U.S. and the Taliban.

At a December hearing, the government of Afghanistan said it objected to the investigation and has set up a special unit to investigate war crimes. The ICC is a court of last resort that only takes on cases if domestic jurisdictions are unable or unwilling to prosecute.

There was no official U.S. delegation at December鈥檚 appeal hearing, but President Donald Trump鈥檚 personal lawyer, Jay Sekulow, appeared on behalf of the European branch of the American Center for Law and Justice and told judges that the U.S. position wouldn鈥檛 change.

He told appeals judges that 鈥渋t is not in the interests of justice to waste the court鈥檚 resources while ignoring the reality of principled non-cooperation.鈥