Wells Fargo CEO John Stumpf will retire effective immediately, the company has announced

NEW YORK — Embattled Wells Fargo CEO John Stumpf will retire effective immediately, the company announced Wednesday, marking a stunning downfall for one of the banking industry’s most powerful figures.

The Wells Fargo boss is out in the wake of a national uproar that erupted after regulators accused the bank of creating more than two million fake bank and credit card accounts. The company admitted to firing 5,300 workers over several years.

A person familiar with the matter said the decision to retire was made by Stumpf but was welcomed by the board.

Stumpf’s resignation comes after Senator Elizabeth Warren publicly condemned him for “gutless” leadership at a Sept. 20 Senate hearing. “You should resign. … You should be criminally investigated,” Warren told Stumpf during a fiery one-sided exchange.

The hearing, and another similarly blistering dressing down of Stumpf before House lawmakers a week later, may have helped speed up Stumpf’s demise. While the bank CEO said he was “deeply sorry” and insisted there was no “scheme” to scam customers, he struggled at times to answer lawmakers’ questions. He often gave the impression he wasn’t fully in charge of the company.

Ironically, Stumpf prided himself on Wells Fargo’s work ethic. In a 2015 Fortune interview he called himself the “keeper of our company’s culture.”

Yet former Wells Fargo employees believe it was precisely the bank’s pressure-cooker sales environment that spurred staffers to open thousands of fake accounts.

The scandal swelled when nearly a half-dozen ex-Wells Fargo workers told CNNMoney they believe they were fired in retaliation for calling the ethics line about improper sales tactics. “They ruined my life,” said Bill Bado, who was fired in 2013 for “tardiness” after alerting HR about fake accounts.

Stumpf, 63, worked for the bank for 34 years, and has served as its CEO since 2007.

“I am grateful for the opportunity to have led Wells Fargo,” Stumpf said in a statement Wednesday. “While I have been deeply committed and focused on managing the Company through this period, I have decided it is best for the company that I step aside.”

Last month, Stumpf agreed to forfeit much of his 2016 salary, including his bonus and $41 million in stock awards, as the bank launched an internal investigation into the phoney accounts.

The probe comes after employees told CNNMoney that the practice of opening fake accounts began years earlier than Wells Fargo has previously acknowledged.

At the time, Stephen Sanger, the board’s lead independent director, said Stumpf and another top bank executive could face further penalties, depending on the results of the investigation. On Wednesday, the person close to the matter said the board will continue its investigation, and that Stumpf’s retirement does not preclude further action against him.

Tim Sloan, Wells Fargo’s president, will take over as chief executive, and lead director Stephen Sanger will take over Stumpf’s other duties as chairman of the board.