European judges have ruled that Lithuania and Romania violated the rights of two al-Qaeda terror suspects by allowing the CIA to torture them.
The US captured Abu Zubaydah and Abd al-Rahim al-Nashiri after the September 2001 attacks in the US and they are now at the Guantanamo Bay prison in Cuba.
The CIA operated secret prisons, including in Lithuania and Romania.
The European Court of Human Rights (ECHR) said both countries had violated the European prohibition of torture.
The ECHR issued a similar ruling against Poland in 2014.
Lithuania and Romania were ordered to pay €100,000 (£88,000; $117,000) in damages each to Abu Zubaydah and Abd al-Nashiri, respectively. The ECHR was unable to visit the suspects at Guantanamo.
The existence of the so-called CIA "black sites" for interrogation - under the so-called "secret rendition" policy - was kept secret for many years after 9/11.
Abu Zubaydah, a stateless Palestinian born in Saudi Arabia, is thought to have been al-Qaeda's chief recruiter in the 1990s, and later became a key organiser, linking Osama Bin Laden to other al-Qaeda cells.
Saudi-born Abd al-Nashiri led al-Qaeda's operations in the Gulf region, according to US intelligence. He allegedly masterminded the attack on the USS Cole in Yemen in 2000, which left 17 dead.
Read more on the US 'war on terror' against al-Qaeda:
The ECHR ruling said Romania hosted a CIA prison in 2003-2005, where Abd al-Nashiri was subjected to "an extremely harsh detention regime".
The ruling said he suffered "inhuman treatment... which Romania had enabled by co-operating with the CIA".
This photo of Abu Zubaydah was released via the Red Cross this year
The same verdict was issued against Lithuania, concerning Abu Zubaydah. The CIA prison in Lithuania operated in 2005-2006.
Article Three of the European Convention on Human Rights, headed "Prohibition of Torture", says: "No-one shall be subjected to torture or to inhuman or degrading treatment or punishment."
The ruling said the suspects were not subject to the harshest interrogation techniques in Lithuania and Romania - that happened in other prisons. But both countries had helped the CIA and failed to properly investigate the prisoners' conditions.
The judges cited CIA documents, according to which terror suspects were subjected to blindfolding or hooding, solitary confinement, the continuous use of leg shackles, and excessive exposure to noise and light.
Both Lithuania and Romania had enabled the CIA to transfer the suspects to other prisons, exposing them to "a foreseeable serious risk of further ill-treatment".
The US military allows very little access to prisoners at Guantanamo
In 2014 the US Senate Intelligence Committee issued a detailed report on the CIA's controversial "war on terror" interrogation programme and the "black sites".
It said al-Qaeda suspects were subjected to repeated waterboarding, slapping, stress positions and sleep deprivation. Waterboarding is simulated drowning and was condemned as torture by the Barack Obama administration.
Abu Zubaydah was kept confined in a coffin-sized box for hours on end, the report said.
And according to the US Justice Department, the CIA used waterboarding at least 83 times in August 2002 against Abu Zubaydah, the New York Times reported.
He is thought to have been a top al-Qaeda operative who ran training camps in Afghanistan, where some of the 9/11 suicide hijackers trained.
The ECHR says the evidence shows that Abu Zubaydah was caught in Pakistan in March 2002 and was first moved to a CIA prison in Thailand. He was flown to another "black site" in Poland in December 2002.
He is believed to have been held in Lithuania from February 2005 to March 2006, when he was moved to Afghanistan and then to Guantanamo Bay.
Abd al-Nashiri faces a possible US death penalty, as military prosecutors have accused him over the USS Cole bombing and some other terror attacks. He allegedly also fought for the Taliban in Afghanistan.
Arrested in Dubai in 2002, he was held in CIA "black sites" in Afghanistan and Thailand. In December 2002 he was moved to another "black site" in Poland, and held there until June 2003, the ECHR says.
He is believed to have been held in Romania from April 2004 to October/November 2005, before his transfer to Guantanamo Bay in September 2006.