NEW YORK (AP) — A former high-ranking FBI counterintelligence official pleaded guilty to a conspiracy charge Tuesday, admitting that he agreed after leaving the agency to work for a Russian oligarch he had once investigated to seek dirt on the oligarch's wealthy rival in violation of sanctions on Russia.

Charles McGonigal, 55, entered the plea in federal court in Manhattan to a single count of conspiring to violate the International Emergency Economic Powers Act and to commit money laundering, saying he was “deeply remorseful for it.”

McGonigal told Judge Jennifer H. Rearden that he carried out his crime in the spring and fall of 2021, accepting over $17,000 to help Russian energy magnate Oleg Deripaska by collecting derogatory information about a Russian oligarch who was a business competitor of Deripaska.

Sentencing was set for Dec. 14, when McGonigal could face up to five years in prison.

Assistant U.S. Attorney Rebecca Dell told the judge that prosecutors had proof McGonigal was making efforts to remove Deripaska from a U.S. sanctions list.

She also said McGonigal in 2021 was in negotiations along with co-conspirators to receive a fee of $650,000 to $3 million to hunt for electronic files revealing hidden assets of $500 million belonging to Deripaska’s rival.

McGonigal, a resident of Manhattan, is separately charged in federal court in Washington, D.C. with concealing at least $225,000 in cash he allegedly received from a former Albanian intelligence official while working for the FBI.

McGonigal was special agent in charge of the FBI’s counterintelligence division in New York from 2016 to 2018. McGonigal supervised investigations of Russian oligarchs, including Deripaska, who was sanctioned in 2018 by the U.S. Department of the Treasury’s Office of Foreign Assets Control.

The U.S. District Court for the District of Columbia later affirmed the sanctions against Deripaska, finding that there was evidence that Deripaska had acted as an agent of Russian President Vladimir Putin.

McGonigal, who became choked up at one point as he described his crime, said Deripaska funneled the $17,500 payment he received through a bank in Cypress and a corporation in New Jersey before it was transferred into McGonigal's bank account.

“This, as you can imagine, has been a painful process not only for me, but for my friends, family and loved ones,” McGonigal said. “I take full responsibility as my actions were never intended to hurt the United States, the FBI and my family and friends.”

In a release, Matthew G. Olsen, assistant attorney general of the Justice Department’s National Security Division, said, “McGonigal, by his own admission, betrayed his oath and actively concealed his illicit work at the bidding of a sanctioned Russian oligarch.”

"Today’s plea shows the Department of Justice’s resolve to pursue and dismantle the illegal networks that Russian oligarchs use to try to escape the reach of our sanctions and evade our laws,” he added.