WASHINGTON — The Central Intelligence Agency’s attempt to keep secret the details of a defunct detention and interrogation program has escalated a battle between the agency and members of Congress and led to an investigation by the C.I.A.’s internal watchdog into the conduct of agency employees.

The agency’s inspector general began the inquiry partly as a response to complaints from members of Congress that C.I.A. employees were improperly monitoring the work of staff members of the Senate Intelligence Committee, according to government officials with knowledge of the investigation.

The committee has spent several years working on a voluminous report about the detention and interrogation program, and according to one official interviewed in recent days, C.I.A. officers went as far as gaining access to computer networks used by the committee to carry out its investigation.

The events have elevated the protracted battle — which began as a fight over who writes the history of the program, perhaps the most controversial aspect of the American government’s response to the Sept. 11 attacks — into a bitter standoff that in essence is a dispute over the separation of powers and congressional oversight of spy agencies.