British prosecutors have filed criminal charges against Barclays and four former bank executives over cash injections from Qatar that helped save the bank during the global financial crisis.

The bank and its former executives have been charged by the U.K.'s Serious Fraud Office with conspiracy to commit fraud by false representation over a June 2008 investment made by Qatar's sovereign wealth fund.

The executives charged include former CEO John Varley and Roger Jenkins, Barclays' former head of investment banking in the Middle East. The pair also face a second charge of conspiracy to commit fraud over an October 2008 deal with a group of Qatari investors.

It's the first time that the Serious Fraud Office, which investigates white collar and financial crimes in the U.K., has charged a bank or individual over actions taken during the financial crisis.

Barclays (BCS) said it "awaits further details" of the charges. Shares in the bank declined 0.5%.

A spokesman for the Qatar Investment Authority declined to comment.

The defendants will appear in court on July 3. The maximum penalty for a criminal fraud charge is 10 years in jail.

A lawyer for Jenkins said that his client intends to "vigorously defend against these charges."

"As one might expect in the challenging circumstances of 2008, Mr. Jenkins sought and received both internal and external legal advice on each and every aspect of the accusations leveled today," said Brad Kaufman, chairman of the securities litigation group at Greenberg Traurig.

Barclays has long been dogged over its handling of the Qatar investments, which helped it avoid a taxpayer bailout as the global financial system crumbled. Accepting government support would likely have meant increased oversight and scrutiny over executive pay.

Shortly after the 2008 investments were made, Barclays made a $3 billion loan facility available to Qatar, according to the Serious Fraud Office.

Regulators in the U.S. and the U.K. have also examined the bank's efforts to raise new capital from sources in Qatar. In 2013, the U.K.'s Financial Conduct Authority proposed fining Barclays £50 million over issues related to its disclosure of £322 million in "advisory services" payments to Qatari investors in 2008.

The regulator put its case on hold, however, pending the outcome of the criminal investigation conducted by the Serious Fraud Office.

"We are pleased that this matter, which led to the stay of our own case, is now in the public domain, the FCA said in a statement on Tuesday. "We welcome a fair and transparent hearing on the basis of the charges set out today."

Related: Barclays CEO pay slashed after he tried to identify whistleblower

The charges are the latest setback for Barclays, which 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.

The company was slapped with a record U.K. fine in late 2015 for trying to keep a huge deal with super rich clients in 2011-2012 secret.

The most recent controversy involves current CEO Jes Staley, who had his pay slashed after he attempted to unmask a whistleblower.

Varley, who spent 28 years at Barclays, resigned from the board of mining group Rio Tinto (RIO) on Tuesday after the charges were announced. His lawyers could not be reached for comment.