Mike Groll, File, Associated Press
In this April 23, 2015 file photo, Benjamin Lawsky, superintendent of the New York State Department of Financial Services, speaks during a Senate hearing on subprime auto loans in Albany, N.Y. Lawsky, New York's top financial regulator, is stepping down after four years and billions of dollars of penalties and fees won from banks and insurance companies.

ALBANY, N.Y. — Benjamin Lawsky, New York state's top financial regulator who collected billions of dollars in penalties and fees from Wall Street giants, announced Wednesday that he will step down.

Lawsky, who was appointed the first superintendent of the Department of Financial Services in 2011, plans to open a New York-based legal and consulting business and be a visiting scholar at Stanford University next fall.

It will be up to Gov. Andrew Cuomo to appoint Lawsky's successor. The 45-year-old plans to stay on in the position until June.

Under Lawsky's leadership, the department has levied $6 billion in penalties and fees against several big banks, insurers and mortgage lenders. Lawsky announced another win Wednesday: Barclays will pay the department $485 million as part of a $2.4 billion national penalty for foreign currency rigging.

The department has made use of 100-year-old statutes to investigate accounting firms for their role in covering up the misdeeds of banks, and in some cases used its enforcement power to oust employees and executives at companies accused of wrongdoing.

Lawsky's office also oversaw the state's consumer protection efforts, recovering $1 billion in unpaid life insurance benefits and encouraging lawmakers to pass a law to protect consumers from unexpected out-of-network medical bills.

The department was created in 2011 in the wake of the financial crisis and economic downturn. It oversees nearly 4,000 financial companies, including many large multinational banks and insurers with offices in New York City.

"I am deeply proud of the work our team has done building this new agency and helping strengthen oversight of the financial markets," Lawsky said in a statement announcing his resignation. "... I have full confidence that the critical work of this agency will continue seamlessly moving forward."