(Reuters) - Wells Fargo & Co said on Thursday Tim Sloan will resign immediately as chief executive, becoming the second CEO to leave the bank in the fallout of a wide-ranging sales practices scandal.

The board said in a statement it concluded it was best to seek an outside candidate to replace Sloan. The bank’s general counsel, C. Allen Parker, one of the few newcomers in the bank’s top ranks, will serve as interim chief executive.

The move amounted to an admission that the board erred three years ago by appointing another insider after the previous CEO, John Stumpf, resigned following revelations that Wells Fargo had opened potentially millions of unauthorized consumer accounts. Prior to becoming CEO, Sloan served as chief operating officer and head of the wholesale bank.

In a Thursday conference call, Sloan, 58, said he decided to leave because the focus on him had become a distraction inhibiting the bank from moving forward.

“I want to assure all of our stakeholders that this was my decision and is not related to our first-quarter financial performance, the long-term outlook for the company or any newly discovered issues,” he said.

On the call, analysts tried unsuccessfully to get a direct answer to whether regulators had given Sloan the final push, or even whether the bank had been surprised by the most recent criticism from the Comptroller of the Currency.

Board Chair Betsy Duke declined to say what qualifications directors want in the next CEO, including whether they will insist on having an executive with banking industry experience. She said the person will be someone who really wants “the challenge and the opportunity...That is the person we want.”

Slideshow ( 3 images )

She added the bank has not yet spoken with anyone regarding the CEO position, and the search committee will meet for the first time on Friday. As recently as a week ago, the board had reiterated its unanimous support for Sloan.

Critics had accused Sloan, who was part of the management team while the wrongdoing was happening, of being too entrenched in Wells Fargo’s culture to change it, even as the bank tried to do just that and move past its scandals.

In March 2018, the U.S. Federal Reserve imposed an unprecedented asset cap on Wells Fargo, barring it from growing its balance sheet until it improved risk management controls. Wells Fargo has said it expects to operate under the cap for the remainder of the year.

It is not yet clear what was the final straw for Sloan. However, the banks primary regulators, the Office of the Comptroller of the Currency and the Federal Reserve, criticized the bank in recent weeks. “What happened at Wells Fargo really was a remarkably widespread series of breakdowns really in their risk management apparatus,” Fed Chairman Jerome Powell said.

The Fed and the Office of the Comptroller of the Currency both declined to comment on Sloan’s departure.

As Wells Fargo tried to move on, it got rid of the lofty sales incentives that led to the fake accounts and repaid millions to customers who were improperly charged fees. But reputational issues continued to hang over the bank as it racked up billions in settlements and fines.

Slideshow ( 3 images )

Wells Fargo has long prided itself on its homegrown culture. But the bank’s insularity proved burdensome in recovering from the scandal.

“The best thing he (Sloan) could do for the company was to retire. In the long run, it is the right move,” RBC Capital Markets analyst Gerard Cassidy said.

Sloan had become a perpetual target for politicians who repeatedly called for his removal. U.S. Senators Elizabeth Warren and Sherrod Brown recently called for his resignation. Earlier this month, he was grilled by the House of Representatives Financial Services Committee.

Parker, the interim head, joined Wells Fargo from an outside law firm as general counsel in March 2017 to help turn around the bank. At the time he was the only one of 11 top executives who had not been at the bank during the scandal.

Parker will receive an annual base salary of $2 million, according to filings. Sloan’s departure came two weeks before the fourth-largest U.S. bank by assets was due to report first-quarter results and a month before its annual shareholder meeting. In 2016, the bank agreed to pay $185 million to the U.S. Consumer Financial Protection Bureau and other agencies, the largest fine of its kind, to settle a sales practice scandal in its consumer retail bank. Two weeks ago, the bank said Sloan received a 5 percent pay raise for 2018, with base salary of $2.4 million, $14 million in stock awards and a $2 million bonus based on the bank’s financial performance.

The bank said in a filing that Sloan will not receive any additional compensation for his sudden exit, though he still stands to earn millions in stock awards as part of the company’s retirement plan.