Attorney General William Barr has recused himself from Jeffrey Epstein’s child sex trafficking case because his former law firm once represented the convicted pedophile.

“I am recused from that matter because one of the law firms that represented Epstein long ago was a firm I subsequently joined for a period of time,” Barr told reporters in South Carolina, according to Newsweek.

On Monday, federal prosecutors in the Southern District of New York unsealed a two-count indictment charging Epstein with sex trafficking and conspiracy for allegedly luring girls as young as 14 to his Manhattan townhouse and his $12 million estate in Palm Beach, Fla.

Epstein pleaded not guilty in federal court.

During Barr’s confirmation hearings before the Senate Judiciary Committee in January, GOP Sen. Ben Sasse of Nebraska asked him whether he would conduct a “full and thorough investigation” into the Justice Department’s handling of Epstein’s case.

Under a much-criticized non-prosecution “sweetheart deal” in Florida in 2008, he pleaded guilty to state charges of soliciting prostitution — despite being accused of sexually abusing more than 30 minors.

He served 13 months behind bars, paid restitution and registered as a sex offender.

“Senator, I have to recuse myself from Kirkland & Ellis matters, I am told,” Barr told Sasse. “And I think Kirkland & Ellis was maybe involved in that case, so I need to sort out exactly what my role can be. I will say that if I’m confirmed, I’ll make sure your questions are answered on this case.”

The law firm’s senior partner Jay Lefkowitz is among the list of attorneys, including Harvard Professor Alan Dershowitz, who once represented Epstein, according to Newsweek, which cited Law and Crime.

Another former Kirkland & Ellis attorney is Labor Secretary Alexander Acosta, who was the Miami US attorney when he reached Epstein’s 2008 agreement.