This article originally appeared on Slate.

How do you spy on a spy? In the case of Senate investigators, you do it by adopting some of their methods.

During the five year investigation into the CIA interrogation and detention program, members of the Senate Intelligence Committee, working in a windowless room at the spy agency's headquarters, suspected that key documents had been removed from their computer network. Luckily, they had a hard copy. To keep it from being destroyed, Senate sleuths spirited the document from the CIA and put it in a safe in the Hart Senate Office Building. The move set off a chain of events that broke open on the floor of the Senate on Tuesday as Sen. Dianne Feinstein, the chairwoman of the intelligence committee, accused the CIA of spying on her investigators . CIA Director John Brennan insists the CIA isn't trying to thwart her investigations. The Justice Department is now conducting two inquiries: one looking into whether the CIA illegally snooped on congressional investigators and another looking into whether those investigators broke the law. The accusations include lying to Congress and to the Justice Department, and spying on congressional investigators to hide what the CIA was doing. Frank Underwood will no doubt be weighing in soon.

Since the rolling revelations from Edward Snowden began last year, members of Congress tasked with overseeing the government's sprawling spy network have been trying to find a new balance between security and civil liberties. The president says there have been no abuses but admits that some changes must be made. This public struggle between Feinstein and the CIA illustrates just how hard it is to keep an eye on people who are paid to go undetected. Even if Feinstein's accusations aren't true, the painstaking process of cat and mouse that is revealed in this story suggests that the oversight process is so time-consuming, frustrating, and opaque that it's almost impossible to apply the necessary scrutiny to the numerous programs that make up the government's intelligence system.

Get Breaking News Delivered to Your Inbox

It's hardly news that the intelligence community resists congressional oversight, but it usually appears to be part of the predictable tussle--resistance based on a desire to maintain the secrecy of security techniques that keep everyone safe. Feinstein's accusations have nothing to do with that. She is claiming that the CIA engaged in a prolonged effort to cover its tracks and that this deception now includes a trumped-up Justice Department criminal report alleging that Senate investigators broke the law.

We are no longer in a predictable fight between two branches of government anticipated by the framers. These are public accusations of criminal activity and a cover-up. It's a class of warfare that people have been craving since Snowden started leaking secrets about the U.S. surveillance state. Whether you think the intelligence agencies have gone too far or not, it's important to have the people's representatives battling for their right to do the job the Constitution puts before them. Otherwise the system gets out of whack. That was one of the lessons of Snowden's revelations and it's also the point of the story Feinstein took to the Senate floor to tell.

The saga starts in 2006, when members of the intelligence committee were first briefed about a CIA interrogation program that had been in place since 2002. This briefing initiated an investigation by Senate staffers who by 2009 offered a preliminary report on the program that Feinstein described as "chilling" and far different and harsher than the way the CIA had described it in the past.

The first level of oversight had failed massively. The findings from the first review initiated another one by the committee--a second attempt at oversight--which the CIA fought at every turn, according to Feinstein. They dumped an un-indexed 6.2 million documents on the Senate committee and requested that each document go through a multilevel review process before handing it over, making the investigation tedious and protracted.

As investigators waded though the documents, some of the information that had been initially provided by the CIA started to disappear from the computer network. When asked about the unauthorized removal, the CIA blamed contractors, and then said the order had come from the White House. In 2010, Feinstein had to get the White House counsel to resolve the matter and order the CIA to return the missing documents, which it did.

Not long after, documents started going missing again. This batch of ghost papers would come to be known as the "Panetta review," referring to Leon Panetta, the former CIA director. They represented an internal summary of what had been provided to the intelligence committee. "What was unique and interesting about the internal documents was not their classification level, but rather their analysis and acknowledgment of significant CIA wrongdoing," said Feinstein.

The power of these Panetta documents and the fact that they had gone missing didn't become apparent until the Senate put together its final report in 2012, six years after first learning about the program and 10 years after the program had started. The CIA responded to the 6,300-page Senate report with a 122-page rebuttal in June 2013. What surprised investigators was that the agency's rebuttal contradicted the conclusions that had been in the Panetta documents. "Some of these important parts [of the Senate report] that the CIA now dispute ... are clearly acknowledged in the CIA's own internal Panetta review," said Feinstein. "How can the CIA's official response to our study stand factually in conflict with its own internal review?"

The contradiction suggests that the CIA was trying to conceal its wrongdoing when it removed the Panetta documents from the network investigators were using. Fortunately for Senate investigators they had printed out the Panetta review before it disappeared. When they saw the discrepancy between what had been written internally and what was being said in public, they decided to remove the physical copies from the CIA in case someone there tried to destroy them as they had previous evidence.

The only problem is that the Senate team had agreed to clear anything it took from the building with the CIA first so that any sensitive information could be redacted. Senate investigators skipped this step with the Panetta documents. Feinstein is unrepentant on this point. "Our staff did just what CIA personnel would have done had they reviewed the document," says Feinstein.

The purloined Panetta review now sits in a Senate safe. Members of the Senate intelligence committee tried to get a full copy from the agency, but in January the CIA refused. By asking for the official version, they spooked CIA personnel, who then secretly searched the computers the Senate committee had been using to prepare the report. The CIA rationalizes that search on the grounds that the committee had somehow obtained the Panetta report by unauthorized means, which Feinstein denies.

Feinstein issued a series of letters to the CIA director asking for some answers and an apology. She's gotten neither. The CIA inspector general has asked the Justice Department to look into the CIA's Senate snooping. Weeks later, the CIA general counsel filed a crimes report to look into the actions of the Senate investigators. Feinstein claims the agency is trying to intimidate and stonewall. In fact, according to Feinstein, the general counsel is a star of the Senate report, mentioned 1,600 times. It is not likely that he is mentioned as an awesome guy.

The last time the CIA got into a big public fight like this it was with George W. Bush's administration over claims that Iraq was trying to buy uranium yellowcake from Niger. Ultimately, CIA Director George Tenet had to take the fall for the faulty information that made it into President Bush's State of the Union speech. Before Tenet's resignation, the agency and the White House traded several rounds of damaging accusations. Referring to their fight with the CIA, a White House official at the time said, "We brought a knife to a gun fight." Feinstein has started a public confrontation with those same forces for which she will have to be well armed.

This story has a simple message: The system that is supposed to maintain the balance between secrets and civil liberties has broken down. Many believed that it already had, but Feinstein, for good reason, had argued that even if changes needed to be made, the essential relationship between her committee and the agencies it oversees was operating within bounds. What she described Tuesday was a total lack of trust on both sides. The level of trust was so low that people may have felt it was necessary to break the law to fulfill their obligations. That's not just bad for this particular relationship; it throws the balance between the two branches into even greater turmoil than it was already in.