WARSAW — The Polish government has appealed a ruling by the European Court of Human Rights that the country violated the rights of two terrorism suspects by transferring them to a so-called “black site” in northeast Poland run by the Central Intelligence Agency, the Ministry of Foreign Affairs said on Friday.

The court ruled in July that the two men had suffered “torture and inhuman or degrading treatment” while they were held at the site. It was the first such ruling involving a European country that had participated in the C.I.A.'s “extraordinary rendition” program, in which terrorism suspects were interrogated secretly at facilities outside the United States and beyond the reach of American constitutional protections.

Mateusz Martyniuk, a spokesman for the Polish chief prosecutor’s office, said the country would also appeal a ruling that it had not cooperated with the European court’s investigation of the case. Mr. Martyniuk said that Poland could not turn over the documents that the court requested because of their highly sensitive and classified nature. “It was a matter of national security,” he said.

The two detainees at the center of the case, Abd al-Rahim al-Nashiri and Abu Zubaydah, are now being held at the American military prison at Guantánamo Bay, Cuba. Mr. al-Nashiri, a Saudi citizen, is accused of planning the 2000 attack on the American destroyer Cole. Abu Zubaydah, who was born in Saudi Arabia, is believed to have been a high-ranking Al Qaeda figure who ran facilities in Pakistan that funneled potential recruits to training camps in Afghanistan.