The American boss of one of Britain's top banks will have his pay slashed after he admitted trying to unmask a whistleblower.

Barclays said in a statement that CEO Jes Staley tried to identify the author of an anonymous letter that the bank was treating as an attempt to report wrongdoing. The bank's staff eventually got help from a U.S. law enforcement agency as it tried to figure out who was behind the letter.

Following an investigation by the Barclays (BCS) board and an external law firm, Simmons & Simmons LLP, the bank said it had concluded that Staley had "honestly, but mistakenly believed that it was permissible to identify the author of the letter."

"It will therefore be issuing a formal written reprimand to Mr. Staley and has decided that a very significant compensation adjustment will be made to Mr. Staley's variable compensation award," it said in the statement.

Staley's total pay came to £4.2 million ($5.2 million) in 2016, including bonus, benefits and pension payments. According to the bank's annual report, he could have made more than £7 million in 2017, not including benefits.

Related: Feds order Wells Fargo to rehire whistleblower

How much Staley loses will be determined once U.K. financial regulators finish an investigation into his behavior and the bank's approach to whistleblowers. New York's Department of Financial Services is also investigating.

Staley, a banker with more than 30 years' experience at JPMorgan (JPM), said he had apologized to Barclays.

The law firm's investigation, the main findings of which were released by the bank, show that the letter's author raised concerns, including some "of a personal nature," about a senior employee who had been hired in 2016.

The author also raised questions about Staley's role in dealing with those concerns, and about Barclays' recruitment process.

Staley asked the bank's information security team to identify the author. The security team contacted and got help from a U.S. law enforcement agency, but the attempt was ultimately unsuccessful.

Barclays chairman John McFarlane said the board had accepted Staley's explanation that he was "trying to protect a colleague who had experienced personal difficulties in the past from what he believed to be an unfair attack."

McFarlane said the board had "unanimous confidence" in Staley and would support his reappointment at its annual shareholder meeting May 10.

Barclays said it would not comment further while the regulators continued their investigation. Its shares fell as much as 1% in early London trading before recovering to close 0.4% higher.

Staley became CEO in December 2015, joining the bank from BlueMountain Capital, where he was managing partner. He succeeded Antony Jenkins, who had spent three years trying to overhaul Barclays following the departure of his predecessor, Bob Diamond, in the wake of a major interest rate rigging scandal that cost the bank billions in fines.

Related: Global banks handled laundered Russian cash

But the bank is still struggling to shake off the legacy of past misconduct. In December, it was accused by a U.S. prosecutor of defrauding investors who bought mortgage securities from the bank before they blew up during the financial crisis.

Earlier last year, Barclays agreed to pay tens of millions of dollars to settle charges that their so called "dark pool" trading platforms gave unfair advantage to high-speed traders who used them.

And in late 2015, Barclays was slapped with a record U.K. fine for trying to keep a huge deal with super rich clients in 2011-2012 so secret it bought a new safe just to store the documents.

The U.K. Financial Conduct Authority said the bank trashed its own rules on making background checks on clients and the origin of their cash, and whether they figured on international sanctions lists.

Barclays was also one of five banks fined in 2015 for trying to rig foreign currency markets in their favor.