JOHN MCCAIN, the senior Republican senator from Arizona, spent five-and-a-half years in a Vietnamese prisoner-of-war camp, where he was constantly beaten and sometimes tied up with ropes and left in excruciating “stress” positions. So he knows what he is talking about when he says that torture “compromises that which most distinguishes us from our enemies”.

On December 9th, he gave a speech following the publication of a report by the Senate Intelligence Committee into torture by the CIA between roughly September 11th 2001 and the end of George W. Bush’s presidency. Such tactics, he said, “stained our national honour”.

The report, which has taken five years to produce, has brought the misdeeds of a decade ago back into the spotlight. It paints a picture of an agency skirting the limits of law and morality in pursuit of its mission. It also raises difficult questions about the effectiveness of congressional oversight. The CIA has already hit back—and with the notable exception of Mr McCain, so too have Republicans.

The details of the “enhanced interrogation techniques” described in the report are mostly not new, but they are still shocking. Detainees were waterboarded, deprived of sleep, forced to endure “rectal rehydration” (replacement of fluids), beaten up and threatened. A footnote suggests that one officer played Russian roulette with prisoners.

This inhumane treatment, the report argues, did not even produce valuable information. Much useful intelligence acquired from tortured detainees—such as that which helped lead to the killing of Osama bin Laden—was given freely, before the “enhanced” interrogation began. The Senate’s investigators allege that the CIA concealed the brutality of its tactics and exaggerated their value in briefings to Congress, the president, the media and others.

The report has already generated a fierce rebuttal from the CIA. Its current director, John Brennan, admitted that the agency “did not always live up to the high standards that we set for ourselves”, but insisted that the failings took place in a short period not long after the September 11th attacks, when the agency was under intense pressure—largely from politicians—to ensure that another attack on that scale would not happen again. He also disputed the charges that the CIA’s techniques were not useful and that it misled Congress. Previous investigations have shown that senior lawmakers from both parties, including Nancy Pelosi, the top Democrat in the House of Representatives, were briefed about waterboarding and raised no objection at the time.

In an interview with Politico, Michael Hayden, a former CIA director, called the Senate’s conclusions “analytically offensive”. He suggested that far from being kept in the dark, Mr Bush personally approved techniques such as waterboarding, and that the Senate committee had considered evidence only from the CIA, not from White House records. Both noted acidly that the Senate’s report is based entirely on an examination of internal documents—the investigators did not interview agents.

Yet some of the allegations may stick. For example, the Senate committee has acquired a photograph showing “well-worn” waterboarding tools at a prison in Afghanistan. The CIA had claimed until now that only three prisoners had been subjected to this torture—and none of them at the Afghan site. At the same site, prisoners were kept shackled in dark cells with only buckets as toilets and with loud music played constantly.

Were these methods legal? In 2012 Barack Obama and his attorney-general, Eric Holder, decided not to prosecute any CIA agents for torture (John Kiriakou, an ex-agent who leaked details of the programme to reporters, was jailed). On December 10th Mark Udall, an outgoing Democratic senator, accused the CIA of lying and called for agents who are implicated in torture to be sacked or prosecuted.

The report embarrasses American allies. In Poland, the former president Aleksander Kwasniewski and the former prime minister Leszek Miller had to admit that they allowed the CIA to run “black sites” on Polish soil, but they insisted they had never approved American torture techniques. “With this publication the Americans lose their potential as an ally,” grumbled Mr Kwasniewski. In less friendly countries, such as China and Iran, the revelations have sparked predictable sniping about how America should not moralise abroad.

Yet the biggest question raised, says Michael Glennon, an intelligence specialist at Tufts University, is about the scrutiny of the CIA by the elected parts of the American government. This report, he points out, has taken so long to be published that the CIA’s rebuttal was in fact written 18 months ago, in 2013. In the period when the abuses were going on, the Senate’s Intelligence Committee failed to subpoena documents, interview CIA officials or ask to visit black sites. The people who were meant to scrutinise America’s intelligence services were instead co-opted. Now, says Mr Glennon, they appear to be exercising “hindsight, not oversight”.

In January Republicans will take over the Senate, and they are in no mood to curb the CIA. Marco Rubio, a Republican senator from Florida, says the report’s publication “places American lives in danger”. Many Republicans agree, or see it as an attempt to smear Mr Bush.

Mr Obama, meanwhile, has refrained from criticising the agency harshly. He has been in charge of it for six years. It and America’s other intelligence agencies no longer torture people. Instead of capturing suspected terrorists, Mr Obama prefers to have them blown to pieces by drone-fired missiles.