In March, John Brennan, the C.I.A. director, was indignant when Senator Dianne Feinstein charged that the agency had broken into computers used by staff investigators from the Senate Intelligence Committee, which she leads. “As far as the allegations of C.I.A. hacking into Senate computers,” he said, “nothing could be further from the truth. I mean, we wouldn’t do that. I mean, that’s just beyond the scope of reason.”

But reason seems to have little to do with the C.I.A.’s operations, as Mr. Brennan apparently discovered far too late. On Thursday, the Central Intelligence Agency admitted that it did, indeed, use a fake online identity to break into the Senate’s computers, where documents connected to a secret report on the agency’s detention and torture program were being stored. Mr. Brennan apologized privately to Ms. Feinstein and to Senator Saxby Chambliss, the vice chairman of the intelligence committee, and promised to set up an accountability board to determine who did the hacking and whether and how they should be punished.

The accountability and the apologies, however, will have to go much further. It’s not just two senators that the C.I.A. has offended by this shocking action. It is all of Congress and, by extension, the American public, which is paying for an intelligence agency that does not seem to understand the most fundamental concept of separation of powers. That concept means that Congress is supposed to oversee the intelligence community and rein in its excesses. It cannot possibly do so effectively if it is being spied on by the spy agency, which is supposed to be directing its efforts against foreign terrorists and other threats to national security.

The committee has been working since 2009 on a comprehensive history of the agency’s antiterror program during the George W. Bush administration, which involved illegal rendition to other countries, detention, and torture of suspects, all producing little useful intelligence. It has been frustrated at many points by stonewalling from the agency, which provided misleading information, hid important facts inside a blizzard of excess documents, and forced endless delays in the declassification process. The 6,300-page report still has not been made public, though parts of it may be released later this month, and it is expected to undercut the Bush administration’s claims that its actions were both legal and effective.