Feb. 5 (UPI) — Brad Karp, chair of the law firm Paul, Weiss, Rifkind, Wharton & Garrison, has resigned his position in the wake of his name appearing in the latest cache of Epstein files.

“Leading Paul, Weiss for the past 18 years has been the honor of my professional life. Recent reporting has created a distraction and has placed a focus on me that is not in the best interests of the firm,” Karp said in a statement. Karp worked at the firm for 40 years.

His replacement is Scott Barshay, who has been with the firm for 30 years. Karp will stay at the firm, working with clients.

On Tuesday, the firm said that Karp “attended two group dinners in New York City and had a small number of social interactions by email” with Epstein, “all of which he regrets,” CNBC reported.

The emails were a part of the tranche of files released on Friday.

Bloomberg reported that an email Karp wrote asked Epstein for help getting a job for Karp’s son — a filmmaker — on a Woody Allen movie.

Paul, Weiss said it represented a client who had a long dispute with Epstein.

“The firm was adverse to Epstein, and at no point did Paul, Weiss or Brad Karp ever represent him,” the firm said.

In March, after President Donald Trump issued an executive order targeting the firm, Karp and the firm agreed to provide $40 million of free legal work for causes the president supports.

“Brad has made immense contributions to Paul, Weiss over his more than four decades with the firm. As Chairman of the firm, he transformed Paul, Weiss in an unprecedented way to the great benefit of our clients. We are grateful to him for his extraordinary dedication and service over his many years as Chairman,” Barshay said in a statement.