NEW YORK (AP) — Wells Fargo’s embattled CEO John Stumpf is stepping down as the nation’s second-largest bank is roiled by a scandal over its sales practices.

The San Francisco bank said Wednesday that Stumpf is retiring effective immediately and also relinquishing his title as chairman. It had earlier announced that Stumpf, the bank’s CEO since 2007, will forfeit $41 million in stock awards.

Wells Fargo’s chief operating officer, Tim Sloan, will succeed Stumpf as CEO. Stephen Sanger, the bank’s lead director, will serve as the board’s non-executive chairman.

Stumpf faced congressional hearings and consumer wrath last month after Wells Fargo was found to have opened millions of unauthorized bank accounts.

Wells Fargo & Co. had been well-known in the banking industry for its ability to sell customers multiple products, such as a new account, a mortgage, a retirement account, or even online banking. The company has agreed to pay $185 million to settle allegations that its workers opened millions of accounts without customers’ permission to reach aggressive sales targets.

Stumpf, a 34-year veteran of the bank, had previously gained acclaim for navigating Wells Fargo through the financial crisis and keeping it free of scandal. But he came under withering pressure over the alleged misconduct, believed to have gone on at the bank for years. Some 5,300 lower-level employees were fired.