Royal Bank of Scotland (RBS) has reached a "final settlement" with three out of the five shareholder groups bringing compensation claims against it in connection with its 2008 rights issue.
The lender, which is still 73% owned by the Government, said the settlement represents 77% of the claims by value in the litigation.
The bank said the deal was struck in order to "minimise further material litigation expense and management distraction and without any admission of liability", adding that it is willing to make available £800 million in total to be "split among all five shareholder groups".
The money is covered by existing provisions.
"RBS will now seek to agree finalised terms with members of the remaining two groups whose claims are presently continuing. Any claims for which settlement is not achieved will, however, continue to be vigorously defended. The trial for such claims is due to commence in March 2017," RBS said.
The legal action is linked to a rights issue overseen by disgraced former boss Fred Goodwin.
In April 2008, RBS asked existing shareholders to inject £12 billion into the firm to strengthen its reserves after the bank had splurged £49 billion to acquire Dutch bank ABN Amro.
The deal proved toxic and, just months later, the value of RBS shares plunged 90% and the Government had to step in.
Current chief executive Ross McEwan said: "We have been very clear that we wanted to deal with as many of our legacy litigation issues as possible during 2015 and 2016.
"We are pleased to have reached this agreement and hope that it will be accepted by the remaining claimant group(s) so that this long course of complex and costly litigation can now be concluded."