PARIS — The European Court of Human Rights ruled Thursday that Poland had violated the rights of two terrorism suspects by allowing their transfer to a secret detention center run by the C.I.A. in Poland, where the two men were tortured.

The ruling says Poland failed to prevent the two men — Abu Zubaydah, born in Saudi Arabia, and Abd al-Rahim al-Nashiri, a Saudi citizen — from being subjected to “torture and inhuman or degrading treatment” after they were brought to the prison in northeast Poland. It ordered Poland to pay 100,000 euros, about $135,000, to Mr. Nashiri and $175,000 to Abu Zubaydah. Both are now being held at the American detention center in Guantánamo Bay, Cuba.

Abu Zubaydah is believed to have overseen the operation of guesthouses in Pakistan where terrorism recruits arrived; he vetted them and provided letters of recommendation allowing them to be accepted for training at a paramilitary camp in Afghanistan, a former Guantánamo detainee said in a military court filing, for example. Mr. Nashiri is accused of plotting the 2000 bombing of the American destroyer Cole.

The existence of a C.I.A. “black site” prison in Poland has been widely reported for years, but the United States government considers the list of countries that hosted the prisons to be highly classified. Mr. Nashiri has been charged with war crimes before a military commission at Guantánamo, and prosecutors are fighting a request by his defense team that the government turn over information related to his treatment by the C.I.A., including where he was held.