The head of the Securities and Exchange Commission’s (SEC) enforcement division resigned on Wednesday in response to a federal judge’s order that could raise questions about her previous legal representation of ExxonMobil.

Alex Oh resigned as the SEC’s enforcement chief on Wednesday afternoon, just six days after taking the job under fire from progressives and other financial sector critics.

Before joining the SEC, Oh was a partner at Paul, Weiss, Rifkind, Wharton & Garrison LLP, where she co-chaired the firm’s corruption practice. She was one of several lawyers at the firm who defended ExxonMobil in a lawsuit brought by Indonesians who claimed they were beaten and tortured by guards hired to protect a company facility.

In her resignation letter, which was widely publicized, Oh stated that she needed to leave the SEC to prevent “a development” in the ExxonMobil case from distracting from the commission’s work.

Her resignation came two days after the judge overseeing the ExxonMobil case in the United States District Court for the District of Columbia ordered attorneys for the oil company to back up claims made about the legal team representing the alleged victims.

Judge Royce C. Lamberth’s decision did not specifically name Oh, but directed ExxonMobil’s lawyers to substantiate their claims that the opposing legal counsel was “agitated, disrespectful, and unhinged” during a deposition. The failure to do so could result in sanctions for the ExxonMobil lawyers, according to the judge.

“We cannot comment on this matter because it involves a ruling in an ongoing litigation. Alex is a person of the utmost integrity and a consummate professional, with a strong ethical code,” said Brad Karp, chairman of Paul, Weiss, Rifkind, Wharton & Garrison.

The hiring of Oh by SEC Chairman Gary Gensler surprised and enraged groups that have long criticized the commission’s approach to enforcement. Democratic lawmakers and financial sector skeptics argue that the SEC, led by corporate attorneys who once represented such firms, has let bad actors off the hook.

Those who questioned Oh’s hiring also questioned Gensler’s stated commitment to crack down on major financial firms involved in excessively risky or fraudulent activities. During his recent confirmation hearing, Gensler, who led the Commodity Futures Trading Commission (CFTC) under former President Obama, was praised by progressives as a tough Wall Street watchdog.

“The SEC has failed the American people by repeatedly selecting Wall Street defense lawyers as Directors of Enforcement. They come to the SEC with needless and unhelpful baggage, including crippling conflicts of interest regarding current and past clients as well as a mindset and milieu ill-suited to being an aggressive enforcer of the law against those past private sector clients,” said Dennis Kelleher, president and CEO of Better Markets, a nonprofit group that supports strict financial regulation and oversight.

“Now is the time to break with that disreputable pattern of hiring the wrong people hoping they will do the right job the American people need done.” Oh will temporarily be replaced by Melissa Hodgman, who served as acting enforcement director before Oh was hired.

“Melissa is an exceptional attorney who has proven to be an effective leader of the Enforcement Division. I’m grateful that she will take on this role again and look forward to working closely with her to fulfill the mission of the SEC,” Gensler said in a statement.

“I thank Alex for her willingness to serve the country at this important time.”