CIA agents tortured a German citizen, sodomising, shackling, and beating him, as Macedonian state police looked on, the European court of human rights said in a historic judgment released on Thursday.

In a unanimous ruling, it also found Macedonia guilty of torturing, abusing, and secretly imprisoning Khaled el-Masri, a German of Lebanese origin allegedly linked to terrorist organisations.

Masri was seized in Macedonia in December 2003 and handed over to a CIA "rendition team" at Skopje airport and secretly flown to Afghanistan.

It is the first time the court has described CIA treatment meted out to terror suspects as torture.

"The grand chamber of the European court of human rights unanimously found that Mr el-Masri was subjected to forced disappearance, unlawful detention, extraordinary rendition outside any judicial process, and inhuman and degrading treatment," said James Goldston, executive director of the Open Society Justice Initiative.

He described the judgment as "an authoritative condemnation of some of the most objectionable tactics employed in the post-9/11 war on terror". It should be a wake-up call for the Obama administration and US courts, he told the Guardian. For them to continue to avoid serious scrutiny of CIA activities was "simply unacceptable", he said.

Jamil Dakwar, of the American Civil Liberties Union, described the ruling as "a huge victory for justice and the rule of law".

The use of CIA interrogation methods widely denounced as torture during the Bush administration's "war on terror" also came under scrutiny in Congress on Thursday. The US Senate's select committee on intelligence was expected to vote on whether to approve a mammoth review it has undertaken into the controversial practices that included waterboarding, stress positions, forced nudity, beatings and sleep and sensory deprivation.

The report, that runs to almost 6,000 pages based on a three-year review of more than 6m pieces of information, is believed to conclude that the "enhanced interrogation techniques" adopted by the CIA during the Bush years did not produce any major breakthroughs in intelligence, contrary to previous claims. The committee, which is dominated by the Democrats, is likely to vote to approve the report, though opposition from the Republican members may prevent the report from ever seeing the light of day.

The Strasbourg court said it found Masri's account of what happened to him "to be established beyond reasonable doubt" and that Macedonia had been "responsible for his torture and ill-treatment both in the country itself and after his transfer to the US authorities in the context of an extra-judicial 'rendition'".

In January 2004, Macedonian police took him to a hotel in Skopje, where he was kept locked in a room for 23 days and questioned in English, despite his limited proficiency in that language, about his alleged ties with terrorist organisations, the court said in its judgment. His requests to contact the German embassy were refused. At one point, when he said he intended to leave, he was threatened with being shot.

"Masri's treatment at Skopje airport at the hands of the CIA rendition team – being severely beaten, sodomised, shackled and hooded, and subjected to total sensory deprivation – had been carried out in the presence of state officials of [Macedonia] and within its jurisdiction," the court ruled.

It added: "Its government was consequently responsible for those acts performed by foreign officials. It had failed to submit any arguments explaining or justifying the degree of force used or the necessity of the invasive and potentially debasing measures. Those measures had been used with premeditation, the aim being to cause Mr Masri severe pain or suffering in order to obtain information. In the court's view, such treatment had amounted to torture, in violation of Article 3 [of the European human rights convention]."

In Afghanistan, Masri was incarcerated for more than four months in a small, dirty, dark concrete cell in a brick factory near the capital, Kabul, where he was repeatedly interrogated and was beaten, kicked and threatened. His repeated requests to meet with a representative of the German government were ignored, said the court.

Masri was released in April 2004. He was taken, blindfolded and handcuffed, by plane to Albania and subsequently to Germany, after the CIA admited he was wrongly detained. The Macedonian government, which the court ordered must pay Masri €60,000 (£49,000) in compensation, has denied involvement in kidnapping.

UN special rapporteur on human rights and counter-terrorism, Ben Emmerson, described the ruling as "a key milestone in the long struggle to secure accountability of public officials implicated in human rights violations committed by the Bush administration CIA in its policy of secret detention, rendition and torture".

He said the US government must issue an apology for its "central role in a web of systematic crimes and human rights violations by the Bush-era CIA, and to pay voluntary compensation to Mr el-Masri".

Germany should ensure that the US officials involved in this case were now brought to trial.