SEC Enforcement Division Director Robert Khuzami speaks at a news conference to announce new criminal charges and a settlement in the case against British oil company BP Plc for the Deepwater Horizon oil spill, in New Orleans on Nov. 15, 2012. BP Plc will pay $4.5 billion in penalties and plead guilty to felony miscomisconduct in the Deepwater Horizon disaster. (JONATHAN BACHMAN/REUTERS)

Robert S. Khuzami, head of the Securities and Exchange Commission’s enforcement division for the past four years, announced Wednesday that he plans to leave the agency in two weeks.

A former federal prosecutor, Khuzami is largely credited with restoring the reputation of a plodding unit that was ridiculed for its failure to detect Bernard Madoff’s massive Ponzi scheme or aggressively pursue financial misconduct on Wall Street.

After joining the agency in February 2009, Khuzami revamped the division into a more nimble team that has brought a record number of cases. An early one, which led to a $550 million settlement with Goldman Sachs in 2010, put the agency back on the enforcement map.

The SEC did not comment on who will succeed Khuzami. But the next pick is sure to face many of the same pressures he did, including demands to hold the barons of Wall Street — and not just their institutions — accountable for misdeeds tied to the financial crisis. The successor will be pressed to do so despite severe budgetary constraints, a hurdle that Khuzami alluded to in a farewell message to the hundreds of lawyers he oversees.

“We specialize in fighting above our weight class — each of you does that every time you go into a conference room facing an army of defense counsel, with seemingly unlimited budgets and the latest technology,” Khuzami wrote in an e-mail.

Khuzami does not leave free of criticism. Members of Congress, investor advocacy groups and SEC Commissioner Luis Aguilar, a Democrat, have blasted some of the settlements his division reached with Wall Street as nothing more than slaps on the wrist.

Khuzami’s departure has been rumored since Mary L. Schapiro stepped down as SEC chairman last month. His name was briefly floated as her possible successor, although at the time several people suggested he would probably prefer to return to the private sector. Before joining the SEC, Khuzami was a top lawyer at Deutsche Bank.

In an interview Wednesday, Khuzami said that he has not started looking for a new job but that when he does, there’s a “decent chance” it will be in the more lucrative private sector, in part because he’s “feeling the pressure to provide for my family.”

The Rochester, N.Y., native is the son of two professional ballroom dancers. His sister is a muralist and his brother is a drummer for Greek and Middle Eastern bands. He started his government career as an assistant U.S. attorney in Manhattan in 1990 after graduating from Boston University School of Law and spending a few years in private practice.

At the U.S. attorney’s office, Khuzami made his mark helping prosecute the infamous “blind sheik,” Omar Abdel Rahman, for the 1993 World Trade Center bombing. During his 11-year career there, he went on to lead the prominent white-collar crime unit and oversaw the investigation of complex securities cases.

Khuzami’s experience as a prosecutor is what ultimately led Schapiro to cold-call him soon after she was nominated to lead the SEC in January 2009.

“I was looking for an enforcement director, and I called a lot of people in the enforcement world, academia and others,” Schapiro said in an interview Wednesday. “His name just kept coming up over and over.”

Khuzami was at Deutsche Bank at the time, and Schapiro expected him to quickly dismiss the idea of another government job. “But he was interested immediately,” she said.

Once inside the agency, Khuzami swiftly flattened the management ranks and reorganized the division into specialized units focused on five high-priority areas, such as market abuse in a model he borrowed from his days in the U.S. attorney’s office.

“People did not like us when we got there,” said Lorin Reisner, who served as Khuzami’s deputy for more than two years and worked with him in the U.S. attorney’s office. “We were two former prosecutors from New York who had never worked for the SEC. There was a lot of skepticism.”

Khuzami also put in place one program that financially rewards whistleblowers and another
that allows his unit to strike non-prosecution or deferred-
prosecution deals with cooperative witnesses, a tool that has helped the agency crack cases.

The approach provided record results for the agency, including an all-time high of 735 enforcement actions in 2011 and 734 last year, as well as a historic number of insider-trading investigations in the past three years.

“Rob’s leadership and bold ideas transformed and reinvigorated the enforcement program,” SEC Chairman Elisse B. Walter said in a statement.

Even one of the SEC’s harshest critics, U.S. District Judge Jed S. Rakoff, had kind words for the departing Khuzami. In 2011, Rakoff rejected a $285 million settlement that the SEC had negotiated with Citibank, in part because the agency did not exact an acknowledgment of wrongdoing from the company.

But Rakoff put that aside on Wednesday.

“Overall, I think he has done a terrific job,” Rakoff said in a statement. “Most important, he has restored a sense of pride and purpose to the S.E.C. enforcement division, and we are all the better for it.”