In 2008, President Obama nominated Ms. Schapiro, a political independent, to head the S.E.C. at a time when extreme economic turmoil had shaken investor confidence in the country's securities regulators.

The agency was faulted for its lax oversight of brokerage firms like Lehman Brothers, which failed in 2008 and contributed to the worst economic downturn since the Great Depression. Just weeks before Ms. Schapiro started as chairwoman, the Wall Street investor Bernard L. Madoff was accused of running a large Ponzi scheme, further damaging the credibility of regulators like the S.E.C., which missed crucial warning signs about the fraud.

"When Mary agreed to serve nearly four years ago, she was fully aware of the difficulties facing the S.E.C. and our economy as a whole," Mr. Obama said in a statement. "But she accepted the challenge, and today, the S.E.C. is stronger and our financial system is safer and better able to serve the American people — thanks in large part to Mary's hard work."

Ms. Schapiro, a lifelong regulator who previously ran the Commodity Futures Trading Commission and the Financial Industry Regulatory Authority, quickly gained a reputation as a consensus builder determined to repair the agency's reputation. A tireless preparer and self-described pragmatist, Ms. Schapiro overhauled the agency's management ranks, revived the enforcement unit and secured more money and technology at a time when other agencies were being asked to cut back. She also helped craft new rules for Wall Street oversight, as part of the Dodd-Frank regulatory overhaul.

"The S.E.C. came back from the brink," said Harvey L. Pitt, a former chairman of the agency under President George W. Bush. "I give her enormous credit for that."

Consumer advocates and other critics, however, say she failed to grab the bully pulpit at a time the country needed a vocal critic of Wall Street. Since the financial crisis, the agency brought few enforcement cases against the Wall Street executives at the center of the crisis.

The S.E.C. notes it has brought a record number of cases over the last two years. While no top banking executives have been charged, the agency has filed actions against 129 people and firms tied to the crisis.

While Ms. Walter will take over as chairwoman, she may not serve the whole term. Among the other people that Mr. Obama may consider to serve as agency chief include Mary J. Miller, a senior Treasury Department official, a person briefed on the matter said. Sallie L. Krawcheck, a former top executive at Citigroup and Bank of America, is also in the running, according to people with knowledge of the matter. The agency's enforcement chief, Robert Khuzami, is a long-shot contender.

As for Ms. Schapiro, few expect her to follow her predecessors and move into private legal practice, where she would defend the banks she has spent years regulating. Instead, they say she is more likely to seek out a position at a university or research group.