Sen. Ron Wyden, D-Ore., angered CIA director John Brennan on Tuesday by asking him to apologize for “spying on a committee responsible for overseeing your agency” in 2014.

“This is the annual threat assessment, is it not?” a visibly irritated Brennan said during a Senate Intelligence Committee hearing on Tuesday. “Do not say that we spied on Senate computers or your files. We did not do that. We were fulfilling our responsibilities.”

The tense exchange hearkened back to a 2014 Senate investigation leading up to the release of a report on torture, when then-Senate Intelligence Committee chair Dianne Feinstein, D.-Calif., accused the CIA of searching a congressional computer network and removing documents. The controversy turned into an intraparty fight over the separation-of-powers between Congress and the executive branch of government.

Brennan apologized to Feinstein, in private, but he refused to do so publicly. On Tuesday, he defended the agency’s actions.

"These were CIA computers, at a CIA-leased facility,” Brennan told Wyden. “It was a CIA network that was shared between Senate staffers conducting that investigation for your report as well as CIA personnel. When it became obvious to CIA personnel that Senate staffers had unauthorized access to an internal draft document of CIA, there was an obligation on the part of CIA officers, who had responsibility for the security of that network, to investigate to see what might have been the reason for that access that the Senate staffers had to that document.”

Wyden repeatedly quoted a CIA inspector general report and a CIA review board that described the agency as gaining “improper” access to Senate files. “When you're talking about spying on a committee responsible for overseeing your agency, in my view, that undermines the very checks-and-balances that protect our democracy and it's unacceptable in a free society,” he told Brennan.

Brennan countered by noting that those reports concluded that the CIA actions “were reasonable” on the whole and didn’t rise to the level of requiring agency officials to be punished. “I do think that you’re mischaracterizing the full tenor of both the accountability board and the inspector general’s report,” he said.

“It’s pretty hard to mischaracterize word-for-word quotes,” Wyden shot back. “They used the words ‘improper access.’”

By then, Wyden’s allotted time for questions had expired, so Senate Intelligence Committee chairman Richard Burr intervened to allow another lawmaker to speak.