HSBC was guilty of a "blatant failure" to implement anti-money laundering controls and wilfully flouted US sanctions, American prosecutors said, as the bank was forced to pay a record $1.9bn (£1.2bn) to settle allegations it allowed terrorists to move money around the financial system.

Hours after the bank's chief executive, Stuart Gulliver, said he was "profoundly sorry" for the failures, assistant attorney general Lanny Breuer told a press conference in New York that Mexican drug traffickers deposited hundreds of thousands of dollars each day in HSBC accounts. At least $881m in drug trafficking money was laundered throughout the bank's accounts.

"HSBC is being held accountable for stunning failures of oversight – and worse," said Breuer, "that led the bank to permit narcotics traffickers and others to launder hundreds of millions of dollars through HSBC subsidiaries and to facilitate hundreds of millions more in transactions with sanctioned countries."

In Mexico the bank "severely understaffed" its compliance department and failed to implement an anti-money laundering programme despite evidence of serious risks. A complex scheme known as the black market peso exchange (BMPE) was used to launder the cash.

Manhattan district attorney Cyrus Vance said: "New York is the centre of international finance and those who use our banks as a vehicle for international crime will not be tolerated."

In the latest embarrassment for Britain's banks, Gulliver said: "We accept responsibility for our past mistakes. We have said we are profoundly sorry for them, and we do so again," he said, insisting Britain's biggest bank was "a fundamentally different organisation" now. It is the largest ever fine for such an offence and even greater than the £940m the bank had feared it faced after the allegations first surfaced in the summer in a report by the US Senate.

The fine for HSBC comes barely 24 hours after Standard Chartered paid £415m to US regulators, and as banks such as Royal Bank of Scotland and UBS brace for a wave of fines in coming days for attempting to rig Libor following the £290m penalty slapped on Barclays in June.

Gulliver was promoted to chief executive two years ago during a management reshuffle caused by the decision by Lord Green, the chairman, to quit to join the government as a trade minister.

The Department for Business, Innovation and Skills, which Green represents, 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. At the time of the report's publication HSBC expressed its regret that there were failures of implementation and Lord Green has said that he shares that regret."

David Bagley, the bank's head of compliance, dramatically quit before the US Senate committee hearing into the case in July and, on Monday, HSBC named a former US official, Bob Werner, as head of group financial crime compliance, a newly created role, as the bank prepared for the fine related to drug allegations.

The penalty includes a five-year agreement with the US department of justice under which the bank will install an independent monitor to assess reformed internal controls. The bank's top executives will defer part of their bonuses for the whole of the five-year period, while bonuses have been clawed back from a number of former and current executives, including those in the US directly involved at the time.

HSBC has managed to avoid being criminally prosecuted – a move that could have stopped the bank operating in the US.

HSBC's share price rose by 2.8p to 644p despite the size of the fine. Ian Gordon, banks analyst at Investec, said the fine was slightly lower than the $2bn he had been pencilling in to his forecasts. But he said: "HSBC's settlement with the US authorities will include a deferred prosecution agreement with the department of justice of five years' duration. Given HSBC's ongoing US business and other continuing conduct investigations, this sword of Damocles is not without teeth, albeit based on what we know, we are regarding the $1.921bn settlement as de facto 'final'."

Gulliver stressed that the bank had co-operated with the US authorities. "Over the last two years, under new senior leadership, we have been taking concrete steps to put right what went wrong and to participate actively with government authorities in bringing to light and addressing these matters," he said.

"We are committed to protecting the integrity of the global financial system. To this end we will continue to work closely with governments and regulators around the world," he added.

The US Senate said the bank had operated a "pervasively polluted" culture that lasted for years, allowing HSBC to move billions around the financial system for Mexican drug lords, terrorists and governments on sanctions lists. HSBC's Mexican operations moved $7bn into the US operations, for instance, which the Senate was told was tied to drug money.

HSBC said it also expected to finalise an "undertaking" with the UK regulator, the Financial Services Authority, "shortly".

The bank has spent $290m on improving its systems to try to avoid a re-run of the events.