A federal judge approved the multibillion-dollar settlement of a lawsuit over credit card swipe fees, resolving an eight-year battle between banks and retailers.

In a 55-page ruling, U.S. District Judge John Gleeson says the settlement will have a positive effect on competition. He was also sharply critical of the tactics and arguments made by many of the nation's largest retailers, which tried to torpedo the deal.

"The vitriol and poor behavior and feigned hysteria mask complex and difficult issues on which reasonable merchants can and do disagree," Gleeson writes.

The antitrust case was brought in 2005 by a small group of retailers who objected to the pricing set by Visa, MasterCard and the banks that issue their cards.

Much has changed in the eight years since the suit was filed, as the judge noted — in particular, Visa (NYSE: V) and MasterCard (MA), which used to be owned by a consortium of banks, have become publicly traded companies.

The settlement deal, struck last year, calls for the defendants to pay an estimated $7.25 billion, though that number fell because many merchants opted out of the agreement. The settlement is now valued at $5.7 billion.

Under the deal, Visa and MasterCard also agreed to allow retailers to impose surcharges on credit-card purchases.

Merchants that opposed the deal included many of the nation's largest retailers. Such dissenting retailers will appeal the judge's decision quickly, Douglas Kantor, a lawyer who represents the National Association of Convenience Stores, said in an email Friday.

"We are very disappointed that this deeply flawed settlement has been approved. It is not supported by the retail industry and would do nothing to reduce swipe fees or keep them from rising in the future," Mallory Duncan, general counsel for the National Retail Federation, says in a news release.

Judge Gleeson wrote that the dissenting retailers were asking for too much, given the limits of what lawsuits can accomplish.

"Even if the objectors are right in contending that additional dominoes must fall before the alleged anticompetitive behavior of Visa and MasterCard is eradicated, those dominoes will have to fall in other forums," Gleeson wrote.

Gleeson also touted the benefits of the new rules allowing merchants to impose surcharges. Retailers have been dismissive of the impact of those rule changes.

"For the first time, merchants will be empowered to expose hidden bank fees to their customers, educate them about those fees, and use that information to influence their customers' choices of payment methods," Gleeson wrote.

The judge's decision was hailed by financial industry groups.

"We are hopeful that today's court-approved settlement marks the final chapter in what has always been nothing more than a legal battle between two industries over who should pay to support our nation's incredibly efficient payment system," said Frank Keating, the president of the American Bankers Association, in a written statement.

"This settlement is in the best interest of all involved parties, and that has been proven today with the court's final approval," the Electronic Payments Coalition, which represents banks and card networks, said in a statement.

Visa and MasterCard both expressed their happiness with the decision, but also signaled a desire to mend fences with retailers. "Today is an important milestone in putting this litigation behind us," MasterCard's general counsel, Noah Hanft, said in a statement, "and we look forward to working in partnership with the merchant community."

"We are confident that through this settlement agreement we have opened the door to new opportunities for collaboration with our merchant clients," Visa Chief Executive Officer Charlie Scharf stated, "so that we can more effectively grow our businesses."

In his ruling, the judge seemed to signal exasperation with the length of the legal saga, noting that more than 400 depositions were taken and more than 80 million pages of documents were exchanged as part of the discovery process.

Subscribe Now

Access to authoritative analysis and perspective and our data-driven report series.

14-Day Free Trial

No credit card required. Complete access to articles, breaking news and industry data.