Poland broke the European human rights convention in helping the CIA to render two terror suspects, the European Court of Human Rights has ruled.
The judges said Poland had co-operated with the secret illegal transfers in 2002-2003, allowing two suspects to be interrogated on its territory.
It is the first such case concerning a CIA "black site" prison in Poland.
Polish officials called the ruling "embarrassing for Poland", but also "premature" because Poland's investigation into the prison allegations was still going on.
The court held that "the treatment to which the applicants had been subjected by the CIA during their detention in Poland had amounted to torture".
The two men - alleged members of al-Qaeda - are currently held at the US Guantanamo Bay prison in Cuba.
They complained to the court that they had been tortured at a US-run facility in Poland, near a village called Stare Kiejkuty, where Nashiri was held for six months and Abu Zubaydah for nine.
The ECHR, in its press release on the case, said that "the Polish state, on account of its acquiescence and connivance in the HVD [extraordinary rendition] Programme, had to be regarded as responsible for the violation of the applicants' rights committed on its territory".
It added that Poland had been aware that the men's transfer to and from its territory had been carried out by the process of "extraordinary rendition".
"Consequently, by enabling the CIA to transfer the applicants to its other secret detention facilities, the Polish authorities exposed them to a foreseeable serious risk of further ill-treatment and conditions of detention in breach of Article Three [prohibition of torture and inhuman or degrading treatment]," it said.
The court ordered the Polish government to pay each of the men 100,000 euros (£80,000; $135,000) in damages. It also awarded Abu Zubaydah 30,000 euros to cover his costs.
Poland has always denied that the CIA operated a secret jail on its territory.
A spokeswoman for Polish President Bronislaw Komorowski called the ruling "embarrassing for Poland" and "a burden both in terms of our country's finances and its image".
The foreign ministry said the ruling was "premature" because Poland's investigation - launched in 2008 - was continuing.
Nashiri is suspected of having masterminded the October 2000 bombing of the US warship USS Cole in Aden, Yemen, which killed 17 US sailors.
He alleged that he was arrested in Dubai in October 2002, then moved to CIA detention centres in Afghanistan and Thailand, and flown to Poland in December 2002, where he was held until June 2003. After that, he said, he was flown to Guantanamo Bay via Morocco.
Abu Zubaydah alleged that he was arrested in Pakistan in March 2002, before being moved to a CIA facility in Thailand and then on to Poland in December 2002, on the same rendition flight as Nashiri. He was held there until September 2003, when he was flown to Guantanamo Bay, he alleged.
The "waterboard" technique - simulated drowning - was among the methods allegedly used during their interrogation. Their lawyers also say the men were subjected to mock executions in Poland and told their families would be sexually abused.
The judges found that the Polish government's refusal to submit evidence requested by the court breached Article 38 of the convention, on the effective conduct of an investigation.
In December 2012 the ECHR ruled against Macedonia over a German citizen also "rendered" by the CIA.
It ordered Macedonia to pay Khaled al-Masri 60,000 euros for arresting him and handing him over to the Americans in December 2003.
The ECHR is also examining complaints about alleged CIA "black sites" dating back to the same period in Lithuania and Romania.