HSBC has been fined £57.4m by the Bank of England for "serious failings" over its measures to protect customer deposits.
The bank failed to accurately identify deposits eligible for Britain's Financial Services Compensation Scheme, the Bank's Prudential Regulation Authority (PRA) said.
Under the scheme, customer deposits are protected up to the value of £85,000.
HSBC said it was pleased to have resolved the "historic matter".
The fine is the second highest to date imposed by the regulator, reflecting the seriousness of the failings, the PRA said.
The regulator said the problems occurred between 2015 and 2022.
Under depositor protection rules, banks must have systems and controls in place to make sure that financial information is logged correctly. This information is needed if the FSCS has to make payments to customers if a bank collapses.
One of HSBC's subsidiaries - HSBC Bank - was found to have incorrectly marked 99% of its eligible beneficiary deposits as "ineligible" for FSCS protection.
HSBC Bank also provided incorrect evidence that its systems satisfied certain requirements of the deposit protection rules, the PRA said.
The PRA said the failings were "so significant" that "it had materially undermined the firm's readiness" for any restructuring should it have been required.
It also said that the bank had "failed to be duly open and cooperative with the PRA" by not alerting it over an approximately 15-month period about the problems identified.
PRA chief executive Sam Woods said: "The serious failings in this case go to the heart of the PRA's safety and soundness objective.
"It is vital that all banks comply fully with our requirements around preparedness for resolution," he said, adding the lender had fallen "far short of its obligations in this area, and failed to disclose its failings to us in a timely manner".
However, the PRA said that it did not consider the bank's breaches to be "deliberate or reckless".
The bank's cooperation throughout the investigation, including admitting early on that it had broken rules, resulted in a reduction to the penalty, the regulator said. Without these reductions, HSBC woudl have been fined £96.5m.
HSBC said it would continue to remain focused on serving its customers.
"The PRA's final notice recognises the Bank's co-operation with the investigation, as well as our efforts to fully resolve these issues," the bank said.
This is the second largest fine the PRA has imposed to date. The highest fine was £87m imposed on Credit Suisse in July 2023.
It is not HSBC's first brush with authorities over failings within its banking operations.
The lending giant was fined £63.9m by the UK's financial regulator in 2021 for "unacceptable failings" of its anti-money laundering systems.
The Financial Conduct Authority (FCA) said weaknesses in HSBC's financial crime safeguards had been highlighted several times before action was taken.
In 2012, HSBC paid $1.9bn after an investigation by the US Department of Justice, for failing to prevent money laundering by Mexican drug cartels. The bank agreed to be monitored by US regulators for five years.
Have you been affected by the issues raised in this story? Share your experiences by emailing firstname.lastname@example.org.
Please include a contact number if you are willing to speak to a BBC journalist. You can also get in touch in the following ways:
WhatsApp: +44 7756 165803
If you are reading this page and can't see the form you will need to visit the mobile version of the BBC website to submit your question or comment or you can email us at HaveYourSay@bbc.co.uk. Please include your name, age and location with any submission.