The acting watchdog at the CIA, who has been accused of retaliating against whistleblowers, is resigning, the agency confirmed Friday.

Christopher Sharpley, whose nomination for the agency’s inspector general post had stalled in the Senate, said in a memo to employees that he is stepping down within 30 days.

"After three decades of public service, he has decided to continue his career outside the agency, and we wish him the best in this new chapter," CIA spokesman Ryan Trapani said in a statement. "CIA's commitment to rigorous, independent oversight is unwavering, and the Office of Inspector General will carry on that important mission through the transition."

Sharpley is also withdrawing his inspector general nomination, CNN reported.

His reason for resigning from the agency and withdrawing his nomination was not immediately clear.

The Senate wasn't prepared to advance Sharpley's nomination until a resolution to complaints from two former CIA employees-turned-whistleblowers who alleged retaliation, according to a congressional aide who wasn't authorized to discuss the matter publicly and spoke only on condition of anonymity.

"Sharpley figured out he wasn't going to be confirmed and decided to step aside," said John Tye, executive director of Whistleblower Aid, who is representing two of the complainants alleging retaliation.

One complainant is Jonathan Kaplan, 59, a former special agent and investigator in the inspector general's office who spent 33 years at the CIA.

A second is Andrew Bakaj, 35, who worked in that office as a special agent from 2012 to 2015. He was instrumental in developing agency regulations governing whistleblower reprisal investigations.

"I'm unaware of any open investigations on me, the details of any complaints about me," Sharpley testified at his confirmation hearing last October.

Sens. Chuck Grassley, chairman of the Senate Judiciary Committee, and Ron Wyden say they find it hard to believe Sharpley didn't know about the complaints when he testified.

"How is it possible that he could have been unaware of any open investigations against him at the time he testified?" Grassley, R-Iowa, and Wyden, D-Ore., asked in a letter they wrote to Senate Intelligence Committee leaders.

They said one of the open cases was being investigated by the Department of Homeland Security's internal watchdog.

Representatives for those former CIA employees told the Associated Press last year that there has been friction for several years within the inspector general's office, an independent unit created in 1989 to oversee the spy agency.

The Associated Press contributed to this report.