(Reuters) - CIA inspector general David Buckley, who investigated a dispute between the agency and Congress over the handling of records of the CIA's detention and interrogation activities, is resigning effective Jan. 31, the CIA said on Monday.

The agency said in a statement that Buckley, who has served as the agency's internal watchdog for more than four years, was leaving the agency to "pursue an opportunity in the private sector."

Officials at both the CIA and on Capitol Hill said his departure was unrelated to politics or anything he had investigated.

Civil liberties advocates said the timing of Buckley's exit was unfortunate. "The CIA inspector general is one of the few people who has tried to impose some accountability on the CIA at a time when the White House and many in Congress are failing to do their oversight jobs," said Christopher Anders of the American Civil Liberties Union.

Danielle Brian, executive director of the Project on Government Oversight, said Buckley had "raised some serious concerns about the conduct of the CIA in trying to thwart the Senate Intelligence Committee ... The lack of repercussions is very troubling and his departure so soon afterwards is troublesome."

Buckley's resignation came as the outgoing chairwoman of the Senate Intelligence Committee, Sen. Dianne Feinstein, issued a series of recommendations "to prevent the future use of torture" by U.S. agencies. Her recommendations include a proposal to increase the CIA Inspector General's power.

Feinstein recommended that the CIA's director issue an order requiring that the Inspector General promptly be notified of all new agency covert actions and all changes or expansions in such operations.

Feinstein also recommended that Congress change U.S. law to explicitly prohibit torture and to ban the CIA from holding detainees for anything but brief periods. She also recommended that the Director of National Intelligence issue orders prohibiting contractors from conducting interrogations and directing, evaluating or managing spy programs.

She also recommended that the intelligence director and U.S. Attorney General order that all "national security interrogations" be videotaped.

Buckley's most public action as CIA inspector general occurred last July when he issued a report on the dispute between the agency and the Senate Intelligence Committee. The report found that some agency employees had "acted in a manner inconsistent" with an understanding between the CIA and the committee regarding access to a special computer network set up to share documents about the agency's involvement in harsh treatment of detained militants.

According to the report, CIA director John Brennan a year ago complained to the Senate Intelligence Committee's leadership, headed by Feinstein, that Senate investigators had obtained documents to which the agency believed they should not have had access.

Subsequently, according to an agency statement, Feinstein expressed concern that CIA officers acted improperly when they searched the special computer network to locate the documents.

Buckley's office reported "a judgment that some CIA employees acted in a manner inconsistent with the common understanding" about access to the network which the Senate panel and agency had reached in 2009, a CIA statement said.

Buckley's office sent its report on the dispute to the Justice Department. Meanwhile, the CIA's acting general counsel filed a criminal referral with the Justice Department complaining about the actions of Senate investigators.

The Justice Department later decided that it had insufficient grounds to open a full-scale investigation into either the Inspector General or general counsel's complaints.

Buckley served both as a senior official in the Treasury and Defense Departments as well as in senior positions at the House Intelligence Committee and the Government Accountability Office.

CIA director John Brennan said that during his tenure, Buckley had "demonstrated independence, integrity, and sound judgment in promoting efficiency, effectiveness, and accountability."

A White House official said that Buckley had been "a tremendous partner to colleagues throughout the Administration." It was not immediately known what Buckley's new role in the private sector would be.