WASHINGTON (AP) -- Four big banks will pay $2.5 billion in fines and plead guilty to criminally manipulating global currency market going back to 2007.

JPMorgan Chase, Citigroup, Barclays and The Royal Bank of Scotland conspired with one another to fix rates on U.S. dollars and euros traded in the huge global market for currencies, according to a settlement announced Wednesday between the banks and U.S. Justice Department. Currency traders allegedly shared customer orders through chat rooms and used that information to profit ahead of their clients.

The criminal behavior took place between December 2007 and January 2013, according to the agreement.

A separate bank, UBS, has agreed to plead guilty to manipulating key interest rates and will pay a separate $203 million criminal penalty.

The broader settlement was long expected. The Commodity Futures Trading Commission had fined those banks a combined $1.4 billion for their involvement in the scheme last year.

Big banks have been fined billions of dollars for their role in the housing bubble and subsequent financial crisis. But even so, the latest penalties are big. Including a separate agreement with the Federal Reserve announced Wednesday, the banks will have paid nearly $9 billion in fines and penalties for their manipulation of the $5.3 trillion foreign exchange market.

Unlike the stock and bond markets, currencies trade nearly 24 hours a day, seven days a week. The market pauses two times a day, a moment known as "the fix." Traders allegedly shared client orders with rivals ahead of the "fix", pumping up currency rates to make profits.

Global companies, who do business in multiple currencies, rely on their banks to give them the closest thing to an official exchange rate each day. Banks are supposed to be looking out for their clients instead of using their clients' needs to profit ahead of them.

It is rare to see a bank plead guilty to any wrongdoing. Even in the aftermath of the financial crisis, most reached what were known as "non-prosecution agreements" or "deferred prosecution agreements" with regulators, agreeing to pay billions in fines but not admit any guilt. If any guilt was found, it was usually one of the bank's subsidiaries or divisions — not the bank holding company itself.

One of the most notable banks to plead guilty to any criminal wrongdoing was investment bank Drexel Burnham Lambert, which plead guilty to fraud in the 1980s following the implosion of the junk bond bubble.