Barclays has been spared a court trial over its emergency fundraising during the global financial crisis.
The High Court has dismissed a claim by the Serious Fraud Office (SFO) to reinstate charges against the bank.
It upheld a Crown Court ruling in May which dismissed all charges against Barclays Bank and its owner Barclays PLC over billions of pounds raised from Qatar in 2008.
If Barclays was found guilty at trial, it could have lost its banking licence.
The SFO had sought to prosecute the company for two offences of conspiring to commit fraud by false representations regarding advisory services agreements with Qatar Holding during the global financial crisis.
Despite the bank now being clear of all charges, the SFO said "it was right to bring this to the attention of the High Court".
Barclays said in a statement to the London Stock Exchange: "Barclays announces that 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."
Four former Barclays bankers still face charges over the Qatari investment.
In 2008, to avoid a government bailout, Barclays took a £12bn loan from Qatar Holdings, which is owned by the state of Qatar.
Under that deal Barclays loaned £2.3bn back to Qatar Holdings.
The SFO alleged the loan was used either directly, or indirectly, to buy shares in Barclays, which the SFO said was "unlawful financial assistance".
They were the first charges to be faced by a British bank in relation to its conduct during the financial crisis.
Former chief executive John Varley, former senior investment banker Roger Jenkins, Thomas Kalaris, a former chief executive of Barclays' wealth division, and Richard Boath, the ex-European head of financial institutions, were all charged by the SFO in relation to the Qatari deal.
Their trial is scheduled to start next year.