U.S. regulators hit five global banks with $5.4 billion in penalties Wednesday for trying to rig foreign currency markets in their favor.

Citigroup (C), Barclays (BCS), JP Morgan Chase (JPM), and Royal Bank of Scotland (RBSPF)were fined more than $2.5 billion by the U.S. after pleading guilty to conspiring to manipulate the price of dollars and euros.

The four banks, plus UBS (UBS) , have also been fined $1.6 billion by the Federal Reserve, and Barclays will pay regulators another $1.3 billion to settle related claims.

The first four banks operated what they described as "The Cartel" from as early as 2007, using online chatrooms and coded language to influence the twice-daily setting of benchmarks in an effort to increase their profits.

The guilty banks "participated in a brazen display of collusion and foreign exchange rate market manipulation," said U.S. Attorney General Loretta Lynch.

Lynch said bankers conspired to enrich themselves at the expense of "countless consumers, investors and institutions around the world." She declined to comment on criminal charges against individual bank employees, saying only that the Justice Department's investigation is ongoing.

The global foreign exchange market is massive yet lightly regulated. Officials said trading in the eurodollar exchange rate market is five times larger than trading on all global stock exchanges combined. The four banks that pleaded guilty accounted for about a quarter of all activity in that market.

The five banks involved in Wednesday's settlement, plus HSBC (HSBC) and Bank of America (BAC), have now paid about $10 billion in total to authorities in the U.S. and Europe for their part in the foreign exchange scandal.

"These unprecedented figures appropriately reflect this breathtaking conspiracy," said Lynch.

UBS admitted it had engaged in "unsafe and unsound business practices" in foreign exchange markets, and also pleaded guilty to one count of wire fraud in relation to the London Interbank borrowing rate, or Libor.

The bank had originally struck a deal over Libor with the U.S. Department of Justice in 2012, but the non-prosecution agreement was terminated after its role in the foreign exchange scandal came to light. It said it would pay a fine of $203 million related to Libor rigging.

Related: More bankers ok with breaking the law to get ahead

"The conduct of a small number of employees was unacceptable and we have taken appropriate disciplinary actions," UBS chairman Axel Weber said in a statement.

UBS said it faces no criminal charges related to the currency market manipulation.

But it's already racked up a hefty bill for market misconduct. Over the past year it has agreed to pay $1.1 billion to authorities in the U.S. and Europe for dodgy dealing in foreign exchange. That's on top of around $1.7 billion in penalties since 2012 related to the Libor probe.

Related: Deutsche Bank in $2.5 billion settlement over interest rate rigging

Some $5 trillion is traded in the global currency market each day, much of it in London. Foreign exchange rates affect the price of imported goods, company earnings and many investments held by pension funds and others.