Updated at 6:15pm ET with Wells Fargo statement.

The chairman and chief executive of Wells Fargo & Co., John Stumpf, has resigned effective immediately in the aftermath of a scandal over the bank's past practice of secretly selling services to unsuspecting customers.

Stumpf will be replaced by President and Chief Operating Officer Timothy Sloan, long considered to be Stumpf's eventual successor.

Wells Fargo has been hammered in recent weeks by critics who say the bank unfairly took advantage of customers to meet sales targets. In September, the bank agreed to pay $185 million to settle charges that it had opened as many as 2 million accounts without the knowledge or approval of customers.

The bank's board already had sought to discipline Stumpf by requiring him to forfeit $41 million in unvested equity.

In a statement, Wells Fargo Lead Director Stephen Sanger said:

"John Stumpf has dedicated his professional life to banking, successfully leading Wells Fargo through the financial crisis and the largest merger in banking history, and helping to create one of the strongest and most well-known financial services companies in the world. However, he believes new leadership at this time is appropriate to guide Wells Fargo through its current challenges and take the Company forward."

Stumpf joined Wells Fargo in 1982 and became the bank's CEO in June 2007 and its chairman in January 2010, according to the statement.

There is no mention of the scandal which lead to Stumpf's two appearances before Congress where he faced bipartisan wrath over the bank's sales practices.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.