(Reuters) - After a difficult, months-long search for a new chief executive, scandal-plagued Wells Fargo & Co WFC.N named as its next leader Charles Scharf, a one-time Jamie Dimon protégé known on Wall Street as a detail-oriented number cruncher who excels in streamlining operations.

FILE PHOTO: Charles Scharf, Chairman and CEO, BNY Mellon, speaks at the 2019 Milken Institute Global Conference in Beverly Hills, California, U.S., April 30, 2019. REUTERS/Lucy Nicholson

Scharf, 54, who joins the fourth-largest U.S. bank next month, has been the CEO of Bank of New York Mellon BK.N and Visa Inc V.N.

He served as a top lieutenant to JPMorgan Chase and Co’s JPM.N Dimon during the financial crisis of 2008. He will become Wells Fargo's third CEO in as many years after a wide-ranging sales practices scandal.

Some analysts said Scharf’s departure from Bank of New York Mellon, where he served only for two years, would hurt the custodian bank. Bank of New York Mellon named former finance head Thomas Gibbons as its CEO on an interim basis. Its shares closed 4.2% lower, while Wells Fargo rose 3.5% on Friday.

“He’s a good choice,” said former Wells Fargo CEO Dick Kovacevich. “He’s very experienced in almost all of these financial services areas.”

Scharf has his work cut out for him.

Wells Fargo is operating under a regulatory microscope, as it tries to rebuild its reputation with customers, investors and politicians after employee whistleblowers revealed in 2016 that the bank had opened potentially millions of unauthorized accounts.

Since then, internal and regulatory probes have discovered other issues in the bank’s businesses, resulting in billions of dollars in fines and penalties.

Its core businesses and shares have lagged.

From 2016-2018, Wells Fargo was the only bank among the top four U.S. lenders to not grow loans or deposits, according to Refinitiv data. Wells Fargo shares have fallen short of the KBW Bank Index as the board looked for a new CEO. Analysts cited uncertainly about management and future financial targets as a top concern.

On Friday, Wall Street analysts applauded the bank’s pick but warned that major regulatory hurdles remained.

“The appointment of Mr. Scharf removes a major overhang,” Saul Martinez of UBS wrote in a note to clients.

While the news cheered Wells Fargo investors, analysts said it was a negative for Bank of New York Mellon.

KBW analyst Brian Kleinhanzl said he was unsure what to expect from Scharf as Wells’ CEO since his tenure at Bank of New York Mellon lasted only for two years.

He added that at Bank of New York, Scharf had gone “on a hiring spree to bring in his people, and now that he has left, long-term strategy is in flux.”

DIVERSITY GOAL

Scharf’s appointment is a win for Wells Fargo. Sources have said that the board’s search process was fraught, with limits on how much the bank could have paid its new chief executive and the requirement that regulators approved of their choice.

The board had said it wanted to find an outsider, a key parameter for satisfying critics in Washington. The board also initially looked the possibility of hiring a diverse candidate, especially a woman, sources have previously said.

But several candidates that the board approached were not interested in the job. At one point, the board considered keeping its interim CEO, Allen Parker, on a permanent basis.

Parker will return to his previous role of general counsel and help the company through its transition.

“They really realized that they needed a competent CEO who could handle the issues at Wells and the regulators, and it didn’t matter – race, gender, those things were secondary,” one of the sources familiar with the matter said, referring to the board.

Wells Fargo spokesman declined to comment on the nature of the search process. A spokesman for the Office of the Comptroller of Currency said the banking regulator had signed off on Scharf’s hiring, clearing a major hurdle in the executive search process.

Two sources who know Scharf describe him as someone more at home with numbers. When he became the CEO at Visa, people joked the company had two chief financial officers - the actual CFO and Scharf, one of the sources said.

At Visa, he is credited with transforming the payment giant’s technology platform and saw the stock price more than double. Scharf was tasked with reinvigorating growth at BNY, a custodian bank which executes back office operations for asset managers.

There he quickly made changes designed to make the company more efficient like overhauling meetings and making leadership changes. So far those changes have not paid off as BNY shares are trading lower than when Scharf took the helm.

One of the sources said Scharf always had aspirations to be the chief executive of a big bank. If his tenure at the San Fransico-based bank goes well, Scharf will have a claim to the same fame as his one-time boss Dimon, the source said.