Six banks have agreed to pay $4.33 billion in fines to global regulators to resolve allegations that they attempted to manipulate foreign exchange rates.

Citibank (C), HSBC (HSBC), JPMorgan Chase (JPM), RBS (RBS)and UBS (UBS) will collectively pay $1.4 billion to the U.S. Commodity Futures Trading Commission and about £1.1 billion ($1.75 billion) to the U.K.'s Financial Conduct Authority. UBS will also make a payment in Switzerland.

The fines are the largest ever imposed by the British regulator, which said it will continue to investigate potential wrongdoing at Barclays (BCS).

In addition, the U.S. Office of the Comptroller of the Currency said Bank of America (BAC), Citibank and JPMorgan Chase will pay a combined $950 million in penalties.

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.

"The market only works if people have confidence that the process of setting these benchmarks is fair, not corrupted by manipulation by some of the biggest banks in the world," said Aitan Goelman, the CFTC's director of enforcement.

Between 2008 and 2013, lax controls at the banks allowed traders to share confidential information and collude with their counterparts at other institutions in an effort to fix rates and increase profits.

Regulators said traders used private online chatrooms to coordinate their buying and selling to shift currency prices in their favor, aiming to making a profit for their banks at the expense of clients.

The traders called themselves "the players", "the 3 musketeers" and the "the A-team." They would agree to take certain positions in order to manipulate the so-called 4 p.m. fix, a 60-second snapshot of afternoon trading in London that forms the basis of a widely-used benchmark.

The FCA said that the banks had failed to manage obvious risks, and that traders were allowed to behave unacceptably.

It is possible that the banks and individual employees will also face criminal charges in both the U.K. and U.S. over attempts to manipulate the rates.

The Federal Reserve is also believed to be investigating banks' conduct in the currency market.

Speaking in a conference call with reporters, Goelman said the CFTC could have continued investigating but decided it had enough evidence to obtain a settlement.

"Settling now allowed us to conserve our resources, which you may have heard are scarce," he said. "I also think there's value to justice being dealt in a timely fashion."

He added that all of the banks cooperated with the investigation and that some have taken steps to ensure that the misconduct won't happen again.

Related: You may never have to rescue a bank again

While all five banks face more than $600 million in fines, UBS was also penalized by Swiss regulators, and will pay a total of $800 million. Citibank will pay the second largest total fine at $668 million.

British regulators said 36 banks that operate in the foreign exchange market, including the five fined Wednesday, will be required to participate in a program to change banking culture and ensure management take more responsibility.

A separate investigation into the actions of officials at the Bank of England found that no staffers were involved with alleged foreign exchange rigging. However, one official was found to have been aware of potential improper conduct, and failed to raise the issue.

The CFTC said that since June 2012, it has imposed penalties of more than $3.34 billion relating to the manipulation of global benchmarks.

-- CNNMoney's Alanna Petroff and Ben Rooney contributed to this report.