NEW YORK — American authorities on Tuesday cited “astonishing” dysfunction at the British bank HSBC, saying that it had helped Mexican drug traffickers, Iran, Libya and others under U.S. suspicion or sanction to move money around the world.

HSBC agreed to pay $1.9 billion, the largest penalty ever imposed on a bank.

The U.S. stopped short of charging executives, citing the bank’s immediate, full cooperation and the damage that an assault on the company might cause on economies and people, including thousands who would lose jobs if the bank collapsed.

Outside experts said it was evidence that a doctrine of “too big to fail,” or at least “too big to prosecute,” was alive and well four years after the financial crisis.

The settlement avoided a legal battle that could have further savaged the bank’s reputation and undermined confidence in the banking system. HSBC does business in almost 80 countries, so many that it calls itself “the world’s local bank.”

Lanny Breuer, assistant attorney general of the Justice Department’s criminal division, cited a “stunning, stunning failure” by the bank to monitor itself. He said that it enabled countries subject to U.S. sanction — Cuba, Iran, Libya, Myanmar and Sudan — to move about $660 million in prohibited transactions through U.S. financial institutions, including HSBC, from the mid-1990s through September 2006.

Officials noted that HSBC officers in the United States had warned counterparts at the parent company that efforts to hide where financial transactions originated would expose the bank to sanctions, but the protests were ignored.

HSBC even instructed an Iranian bank in one instance how to format messages so that its financial transactions would not be blocked, Breuer said.

“The record of dysfunction that prevailed at HSBC for many years is simply astonishing,” Breuer said.

For the government not to go a step further and prosecute was “beyond obscene,” said Bill Black, a former U.S. regulator for the Office of Thrift Supervision.