LONDON (Reuters) - A High Court judge has denied a Serious Fraud Office application to charge Barclays BARC.L over its 2008 capital raising, potentially ending the biggest remaining legal headache facing the British bank over its conduct during the financial crisis.

A Barclays bank building is seen at Canary Wharf in London, Britain May 17, 2017. REUTERS/Stefan Wermuth

A British court dismissed the charges against the bank last May in a decision that the SFO, which prosecutes financial crimes, said it would seek to reverse by applying to the High Court to reinstate them.

“The High Court has today denied the SFO’s application to reinstate in respect of all of the charges. As a result, all of the charges remain dismissed,” Barclays said in a statement.

The SFO said on Friday it could not comment on the decision, citing reporting restrictions on other cases related to the 2008 fundraising which are set to continue.

Barclays denied the SFO’s allegation that a $3 billion loan it made to Qatar in November 2008 was connected with a Qatari investment in the British bank which ultimately helped it avoid a British government rescue during the financial crisis.

Qatar, which is a major investor in Britain, has not been accused of wrongdoing, but public companies in Britain are normally prohibited from lending money for the purchase of their own shares, known as “financial assistance”.

SFO SETBACK

The collapse of one of its most high-profile corporate prosecutions represents a major setback for the SFO, which has long faced criticism from British politicians.

And the verdict deals a decisive blow to the unprecedented, criminal prosecution of a major bank over events which took place at the height of the credit crisis.

The SFO’s attempt to try and reinstate the charges, once they were knocked back by a court, was an unusual strategy and some lawyers said they were not surprised it had failed.

Sam Tate, a partner at RPC in London, said he did not think it unreasonable of the SFO to have attempted the move and noted it was now for the Financial Conduct Authority (FCA) and other authorities to continue their parallel investigations.

“I wouldn’t describe this as a huge setback. It reaffirms a decision already made by a lower court and it was an unusual process,” Tate said.

Separately, four former Barclays bankers face a charge of conspiracy to commit fraud by false representation when they negotiated a capital injection for the bank from Qatar, in a trial due to start in January.

Barclays still faces other legal and regulatory problems related to the 2008 fundraising. The U.S. Department of Justice and the Securities and Exchange Commission are investigating the case.

British businesswoman Amanda Staveley has a separate $1 billion civil lawsuit against Barclays over the same fundraising.