Problems at the fourth biggest U.S. bank came to light in 2016 with the news that employees had created millions of fake accounts to meet sales quotas. Since then, more issues tied to sales practices have emerged across the bank's business lines, including mortgage, auto lending and wealth management operations. Last year, the Federal Reserve took the extremely rare step of capping the bank's asset growth after the bank found more problems with customer dealings.

Sloan, the three-decade Wells Fargo veteran who was supposed to clean up the mess that had claimed his predecessor, had struggled to satisfy regulators' demands to overhaul the sprawling institution.

Tim Sloan, who took over as chief executive of the bank in October 2016, is resigning as CEO immediately, the bank said Thursday in a release. The bank's general counsel, Allen Parker, will take over as interim CEO, and the bank is searching externally for a permanent successor.

Still, the news that Sloan was stepping down came suddenly.

Earlier this month, the bank said that Sloan had merited a 5 percent raise to $18.4 million for his work in 2018. And when there were news reports that the bank was considering a former Goldman Sachs executive as a potential CEO, the bank issued strong statements that Sloan had the full confidence of its board.

Just two weeks ago, a haggard-looking Sloan testified before Congress about his efforts to clean up the various messes he had inherited. Before the four-hour hearings began, CNBC's Ylan Mui asked Sloan how long he expected to remain CEO, and he replied that he, his board and all of his 260,000 employees thought he was doing a great job.

But in the end, the pressure was just too great.

Sloan informed the board Tuesday that he felt his presence was a hindrance for the company, according to a Thursday call conference call with reporters. The move wasn't the result of the banks first-quarter performance or any "newly discovered issues," he said.

Sloan's departure reflects "his belief that a new CEO at this time will best position the company for success," the bank's chair, Betsy Duke said in a statement.

Rather than look for a replacement internally, the board said it would find one from outside the company. The bank's critics, including Sen. Elizabeth Warren, have said that Sloan was too associated with the bank to be an effective change agent.

Wells Fargo shares jumped 2.6 percent in extended trading Thursday following the announcement.

Shares of the bank have struggled amid the fallout from the sales practices scandal and scrutiny from political leaders. Over the last five years, the stock is flat, compared to a near 70 percent jump in J.P. Morgan Chase shares and a 40 percent move higher for the whole S&P financial sector.

Sloan's departure follows repeated calls from lawmakers for the CEO to step down. In October, Sen. Warren sent a letter to Federal Reserve Chairman Jerome Powell calling on the Fed to maintain its growth cap on Wells Fargo until the bank replaces Sloan.