Barclays has been fined a record £38m by the City regulator for failing to keep its clients' assets separate from its own.
The fine comes three years after Barclays paid out £1.1m for a similar issue.
The Financial Conduct Authority (FCA) said the bank's investment arm had put £16.5bn of clients' assets "at risk" between November 2007 and January 2012.
Barclays said it did not profit from the issue and no customers lost out.
The fine relates to activities in Barclays' investment bank, and has no impact on its retail customers.
"Clients risked incurring extra costs, lengthy delays or losing their assets if Barclays had become insolvent," the FCA said.
And FCA director of markets David Lawton said safeguarding client assets was "key" to maintaining market confidence.
"Barclays lack of focus on the rules was unacceptable," he added.
Barclays, which reported the issue to the FCA itself, said it accepted the FCA's finding.
"Barclays has subsequently enhanced its systems to resolve these issues and to ensure we have the requisite processes in place. No client has suffered any loss as a consequence of this weakness in our processes which existed prior to January 2012," a spokesperson added.
It is the biggest fine ever issued for this particular offence.
However, the FCA said Barclays received a 30% discount on the fine because it agreed to settle it at an an early stage.
Since the 2008 collapse of Lehman Brothers, when many of its clients were unable to access their funds, the FCA has insisted that customers' money is kept separate from the bank's own assets.
"All firms should be clear after Lehman that there is no excuse for failing to safeguard client assets," the FCA director of enforcement and financial crime Tracey McDermott said.
The FSA, the FCA's predecessor, fined JP Morgan £33.3m over the issue in 2010, the then biggest penalty.
In 2011, Barclays was fined £1.12m by the FSA for failing to ring-fence client money in one of its accounts for more than eight years.
The penalty comes as Barclays tries to defend itself against fraud charges in the US in relation to the sale of mortgage bonds and follows a £26m fine in May for fixing the gold price.