A former FBI counterintelligence official pleaded guilty on Tuesday to charges related to his work for a Russian oligarch who he was once investigating.

55-year-old Charles McGonigal told a federal judge in New York City he was "deeply remorseful" for the prior work done for Russian oligarch Oleg Deripaska.

The former FBI special agent in charge of the agency's counterintelligence division from 2016 to 2018 told the federal judge that he took over $17,000 from Deripaska in exchange for collecting derogatory information on a different Russian oligarch. Deripaska was a business competitor with the person McGonigal was paid to find derogatory information on.

Additionally, McGonigal was allegedly working to help get Deripaska removed from the sanctions list, prosecutors said.

FBI SAYS UTAH MAN WHO ALLEGEDLY THREATENED BIDEN WAS KILLED AFTER POINTING .357 HANDGUN AT AGENTS

Charles McGonigal

Charles McGonigal, former special agent in charge of the FBI's counterintelligence division in New York, arrives to Manhattan federal court in New York, Tuesday, Aug. 15, 2023. (AP Photo/Seth Wenig)

The American was in talks, along with co-conspirators, to get a $650,000 to $3 million fee to search for hidden assets of $500 which belong to Deripaska's business rival.

McGonigal is being charged with violating the International Emergency Economic Powers Act and conspiring to launder money, which has a maximum sentence of 5 years in prison.

During his time in the FBI, McGonigal oversaw the agency's investigations of Russian oligarchs, which includes Deripaska.

McGonigal said during the hearing on Tuesday that his intention wasn't to harm the U.S. 

PHILADELPHIA TEEN CHARGED WITH PLANNING NATIONAL TERRORIST ATTACK

Charles McGonigal

Charles McGonigal, former special agent in charge of the FBI's counterintelligence division in New York, center, arrives to Manhattan federal court in New York, Tuesday, Aug. 15, 2023. (AP Photo/Seth Wenig)

"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."

FBI Assistant Director in Charge James Smith said in a press release "Economic sanctions are a critical component of our national security policy."

"They must be fully and fairly applied to effectively limit the resources of those who threaten to harm the United States and our global allies.  Sanctions evasion by fraudulent means is a serious criminal offense.  By entering a guilty plea today, former FBI official Charles McGonigal has accepted responsibility for his actions. The FBI is committed to rigorously investigating reported sanctions violations and relentlessly pursue anyone engaged in such activity," Smith said.

CLICK HERE TO GET THE FOX NEWS APP

Charles McGonigal

Charles McGonigal, former special agent in charge of the FBI's counterintelligence division in New York, arrives to Manhattan federal court in New York, Tuesday, Aug. 15, 2023. (AP Photo/Seth Wenig)

McGonigal is separately facing charges in federal court for hiding at least $225,000 in cash he allegedly was given by a former Albanian intelligence official during his time at the FBI.

The Associated Press contributed to this report.