The S.E.C.’s director of enforcement stepped down just days after taking the job.

Gary Gensler’s tenure leading the Securities and Exchange Commission is off to a rocky start: Alex Oh, who he named just days ago to run the regulator’s enforcement division, has resigned following a federal court ruling in a case involving one of her corporate clients, ExxonMobil.

In her resignation letter on Wednesday, Ms. Oh said the matter would be “an unwelcome distraction to the important work” of the enforcement division.

Ms. Oh’s resignation letter followed a ruling on Monday from Judge Royce C. Lamberth of the Federal District Court for the District of Columbia over the conduct of Exxon’s lawyers during a civil case involving claims of human rights abuses in the Aceh province of Indonesia.

According to Judge Lamberth’s ruling, Exxon’s lawyers claimed without providing evidence that the plaintiffs’ attorneys were “agitated, disrespectful and unhinged” during a deposition. He ordered Exxon’s lawyers to show why penalties were not warranted for those comments.

the plaintiffs that Exxon’s security personnel “inflicted grievous injuries” on them. The lawsuit was brought under the federal Alien Tort Claims Act, which enables residents of other countries to sue in the United States for damages arising from violations of U.S. treaties or “the law of nations.”

Mr. Gensler said in a news release that Melissa Hodgman, who had been the enforcement division’s acting chief since January, will return to that position. Ms. Hodgman has been an enforcement attorney with the agency since 2008. He thanked Ms. Oh for her “willingness to serve the country.”

had been criticized by the Revolving Door Project, a good-government group, because she had been in private practice for so many years and had defended some of the largest U.S. companies.

View