Media playback is unsupported on your device Media caption Loretta Lynch, US Attorney: "Their US compliance department was woefully inadequate"

The US said "dangerous practices" at HSBC allowed the bank to pass money to "drug kingpins and rogue nations", as it fined it $1.9bn (£1.2bn).

HSBC agreed the fine, the largest of its kind, earlier on Tuesday.

A US Senate investigation said the UK-based bank had been a conduit for drug barons and nations such as Iran against which it had sanctions, making it illegal to do business there.

HSBC admitted having poor money laundering controls and apologised.

Money laundering is the process of disguising the proceeds of crime so that the money cannot be linked to the wrongdoing.

US Assistant Attorney General Lanny Breuer said in a statement: "HSBC is being held accountable for stunning failures of oversight - and worse - that led the bank to permit narcotics traffickers and others to launder hundreds of millions of dollars through HSBC subsidiaries.

Another official said it was implicated in "wilful and dangerous" practices.

'Sorry'

"We accept responsibility for our past mistakes," said HSBC group chief executive Stuart Gulliver in a statement.

"We have said we are profoundly sorry for them, and we do so again."

The bank said it had spent $290m on improving its systems to prevent money laundering and clawed back some bonuses paid to senior executives in the past.

If HSBC had been indicted for these offences, that would have meant that the US government and others could no longer have conducted business with it, which would have been humiliating and highly damaging.

It also said it expected to reach an agreement with the UK's Financial Services Authority shortly.

Last month it announced it had set aside $1.5bn to cover the costs of any settlement or fines.

The news followed the announcement of a similar but much smaller settlement with UK-based Standard Chartered bank, which will pay $300m in fines for violating US sanctions.

The cases are seen as part of a crackdown on money laundering and sanctions violations being led by federal government agencies and New York state authorities.

Senate criticism

The settlement had been widely expected following a report by the US Senate, published earlier this year, that was heavily critical of HSBC's money laundering controls.

The report alleged that:

HSBC in the US had not treated its Mexican affiliate as high risk, despite the country's money laundering and drug trafficking challenges

The Mexican bank had transported $7bn in US bank notes to HSBC in the US, more than any other Mexican bank, but had not considered that to be suspicious

It had circumvented US safeguards designed to block transactions involving terrorists drug lords and rogue states, including allowing 25,000 transactions over seven years without disclosing their links to Iran

Providing US dollars and banking services to some banks in Saudi Arabia despite their links to terrorist financing

In less than four years it had cleared $290m in "obviously suspicious" US travellers' cheques for a Japanese bank, benefiting Russians who claimed to be in the used car business

The report suggested HSBC accounts in Mexico and the US were being used by drug barons to launder money.

BBC business editor Robert Peston said that as big as the $1.9bn penalty looks, it could have been much worse.

"HSBC has signed a Deferred Prosecution Agreement for breaches of the US Bank Secrecy Act, the Trading with the Enemy Act and assorted money laundering offences. This is in effect putting the bank on probation," he said.

"But if HSBC had been indicted for these offences, that would have meant that the US government and others could no longer have conducted business with it, which would have been humiliating and highly damaging."

'Failures'

The bank stressed that it had taken on new senior management since the time the problems happened.

Lord Green was chairman of HSBC from 2006 until late 2010 and is now Minister of State for Trade and Investment.

In a statement, his department said: "The report by the US Senate Sub-Committee sets out in detail the evidence submitted to it, and the action taken by HSBC to ensure compliance with US regulations at the time that Lord Green was group chairman. It is for HSBC to respond to this report."

HSBC has announced it has appointed a former US official to work as its head of financial crime compliance, which is a new position.

Bob Werner was previously the head of the US Treasury's Office of Foreign Assets Control (OFAC) - the agency responsible for enforcing the US sanctions on countries including Iran.

He will be responsible for beefing up HSBC's anti-money laundering and sanctions compliance systems.

It is unclear what impact the case will have on HSBC's business. The bank is the biggest in Europe by market capitalisation, and made pre-tax profits of $12.7bn for the first six months of 2012.