WASHINGTON (AP) — Four of the world's biggest banks agreed Wednesday to pay more than $5 billion in penalties and plead guilty to rigging the currency markets — a rare instance in which federal prosecutors have wrung an admission of criminal wrongdoing from a major financial institution.Traders at JPMorgan Chase, Citigroup's banking unit Citicorp, Barclays and the Royal Bank of Scotland were accused of working together to manipulate rates on the foreign exchange market, where hundreds of billions of dollars and euros change hands back and forth.The penalties are a victory for the government and reflect a broader effort by the Justice Department, long criticized as reluctant to prosecute big banks, to tackle financial misconduct.In the past 18 months, prosecutors have brought criminal cases against banks accused of tax evasion and sanctions violations, and have reached multibillion-dollar settlements with several others for their roles in the 2008 financial meltdown.Still, the punishment announced Wednesday may have limited practical consequences.The four banks will be able to continue to do business in the currency markets. No executives were charged, though that part of the investigation continues. And the fines, while large, are a fraction of what the institutions have made through currency trading over the past decade.Prosecutors said traders shared customer orders through chat rooms and used that information to profit at their clients' expenses. The traders called themselves "The Cartel," and in one of those chat rooms, a Barclays employee wrote: "if you aint cheating, you aint trying," investigators said.The banks will pay a combined $2.5 billion in criminal penalties for manipulation of currency rates between 2007 and 2013. The Federal Reserve is slapping them with an additional $1.6 billion in fines. Finally, Britain's Barclays is paying an additional $1.3 billion to British and U.S. regulators.A fifth bank, Switzerland's UBS — which was scrutinized years earlier in a similar scheme — has agreed to plead guilty to manipulating key interest rates and will pay a separate criminal penalty of $203 million."Having to enter into a guilty plea, at the parent level by a major financial institution, is not something that they enter into lightly, nor is it something they enter into with any great joy in their hearts," Attorney General Loretta Lynch said.All told, including an agreement announced last year, the group of banks will pay nearly $9 billion in fines for manipulating the $5.3 trillion currency market.Still, JPMorgan Chase had $4.1 billion in revenue from its fixed income and currencies business in the first quarter of this year alone, while Citi had $3.48 billion.It is rare to see a bank plead guilty to wrongdoing. Even in the aftermath of the meltdown, most financial companies reached "non-prosecution agreements" or "deferred prosecution agreements" with regulators, agreeing to pay tens of billions in fines but not admitting any guilt. If any wrongdoing was acknowledged, it was usually by one of the bank's subsidiaries or divisions, not the overall company.An earlier case against UBS underscores the difficulty of deterring banks from bad behavior.In 2012, the bank admitted manipulating interest rates and signed a non-prosecution agreement with the Justice Department. But after it became clear that UBS was involved in currency rate manipulation, the government tore up that agreement and imposed new penalties."Unlike the other banks, UBS has a 'rap sheet' that simply cannot be ignored," said Leslie Caldwell, head of the Justice Department's criminal division. "Enough simply is enough."UBS said it received partial immunity from the currency market charges by being the first bank to report the corruption to the Justice Department and cooperate.Unlike stocks and bonds, 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 in the cartel allegedly shared client orders with rivals ahead of the "fix" and pumped up currency rates to make profits.Global companies do business in multiple currencies and rely on their banks to give them the closest thing to an official exchange rate each day. The banks are supposed to be looking out for them. Travelers who regularly exchange currencies also need to get a fair price for their euros or dollars.The number of traders who took part in the currency fixing was small. JPMorgan said it has fired one trader. Citi said it dismissed nine employees. Barclays has fired eight employees tied to "The Cartel," according to New York regulators.The banks have agreed to help prosecutors investigate individuals who took part in the rigging.