National Westminster Bank (NatWest) was fined £264.8 million (U.S. $350 million) for three offenses of failing to comply with the United Kingdom’s anti-money laundering (AML) laws.

The fine was imposed by Justice Sara Cockerill of the Southwark Crown Court on Monday. NatWest pleaded guilty in October to violating the 2007 Money Laundering Regulations, marking the first time the U.K. Financial Conduct Authority (FCA) has pursued criminal charges for money laundering failings.

“[I]t must be borne in mind that although in no way complicit in the money laundering which took place, the bank was functionally vital. Without the bank—and without the bank’s failures—the money could not be effectively laundered,” said Justice Cockerill in her sentencing remarks.

In addition to the fine, NatWest was ordered to pay the FCA £4.3 million (U.S. $5.7 million) for the cost of the investigation. The bank must also pay back approximately £460,000 (U.S. $608,000) earned in fees on the money being laundered.

The charges stemmed from failures by NatWest to raise red flags regarding large amounts of cash deposited by a customer, jewelry wholesaler Fowler Oldfield, from 2012-16. Fowler Oldfield would deposit a total of roughly £365 million in the bank over that period, around £264 million of which was in cash.

NatWest employees reported their suspicions to the bank’s AML staff that cash from Fowler Oldfield was being laundered, but no action was taken, the FCA said. In addition, some of the cash deposited was incorrectly recorded as checks, which carry a lower money laundering risk.

As part of an ongoing investigation into Fowler Oldfield, 11 people have pleaded guilty to money laundering charges related to the cash deposits. Sixteen others, including three couriers already charged, are awaiting trial, the FCA said. Fowler Oldfield was shut down in 2016 following the police investigations that led to the charges.

“NatWest is responsible for a catalogue of failures in the way it monitored and scrutinized transactions that were self-evidently suspicious. Combined with serious systems failures, like the treatment of cash deposits as checks, these failures created an open door for money laundering,” said Mark Steward, executive director of enforcement and market oversight at the FCA, in a press release. “Anti-money laundering controls are a vital part of the fight against serious crime, like drug trafficking, and such failures are intolerable ones that let down the whole community, which, in this case, justified the FCA’s first criminal prosecution under the Money Laundering Regulations.”

National Westminster Bank is a subsidiary of NatWest Group, which was formerly the Royal Bank of Scotland Group.

NatWest cooperated with the FCA’s investigation, resulting in its fine being reduced 33 percent from a possible £397 million (U.S. $524.6 million) penalty.

“NatWest takes its responsibility to prevent and detect financial crime extremely seriously. We deeply regret that we failed to adequately monitor one of our customers between 2012 and 2016 for the purpose of preventing money laundering,” said CEO Alison Rose in a statement. “While today’s hearing brings an end to this case, we will continue to invest significant resources in the ongoing fight against financial crime.”

When NatWest pleaded guilty to the AML charges in October, it said it has invested nearly £700 million in the last five years in upgrades to its transaction monitoring systems, automated customer screening, and new customer due diligence solutions, with plans to invest “over £1 billion to further strengthen financial crime controls over the next five years.”

Additionally, NatWest noted it “currently has more than 5,000 staff in specialist financial crime roles, dedicated to detecting and preventing financial crime under the leadership and focus of a centralized bank-wide ‘FinCrime Hub.’”