A settlement of up to $6.2 billion won't be enough to end Visa's and Mastercard's long-running feud with the biggest U.S. retailers.

In the largest class-action settlement of a U.S. antitrust case, Visa and Mastercard agreed to pay from $5.54 billion to $6.24 billion to a class of more than 12 million merchants who accept the payment networks' cards, according to a regulatory filing on Tuesday. The total is in line with sums the companies previously set aside to cover the costs of the litigation.

But retailers are gearing up for the next round in their fight with the world's biggest payment networks. Tuesday's settlement addresses only monetary damages associated with the lawsuit. There's a separate class of merchants fighting for changes to Visa's and Mastercard's business practices.

"The monetary settlement doesn't solve the problem," Stephanie Martz, general counsel for the National Retail Federation, said in a statement. "Ending the practices that lead to these anticompetitive fees is the only way to give merchants and consumers full relief once and for all."

The card networks' dispute with retailers began in 2005, when Visa and Mastercard were owned by banks. Merchants accused them of violating antitrust laws by illegally inflating swipe, or interchange, fees that merchants pay on every purchase and that banks used to fund consumers' credit-card rewards. The payment networks have since gone public — Mastercard in 2006 and Visa in 2008 — and their shares have soared.

As part of the payment for Tuesday's settlement, Visa and Mastercard will use shares owned by banks including JPMorgan Chase & Co., Citigroup, and Bank of America. The lawsuit is one of many flash points in the battle between retailers and financial firms over swipe fees. Merchants paid Visa and Mastercard nearly $71 billion in swipe fees last year, according to the Nilson Report.

"After years of thoughtful negotiation, we are pleased to be able to reach this agreement and move forward in our partnership with merchants to provide consumers convenient, reliable, secure ways to pay," Kelly Mahon Tullier, Visa's general counsel, said in a statement included in the regulatory filing.

Throughout the litigation, merchants have said that lowering the amount they pay in swipe fees will also benefit their customers in the form of lower prices. Interchange has become costly for retailers with thin margins, said Mitch Goldstone, president and chief executive officer of ScanMyPhotos.com, one of the suit's most active plaintiffs.

"Although, like any big industry, change comes more slowly than many would like, we already see changes as a result of the earlier" settlement, Goldstone said in a statement. The litigation has "helped fix a broken system and recover billions of dollars for millions of class members."

This isn't the first time a settlement has been reached in the case. In 2013, the parties struck a then-record $5.7 billion deal that was approved by U.S. District Judge John Gleeson, only to have a federal appeals court reject it three years later, ruling that a provision that barred merchants from suing over fees was unfair. The court also said that lawyers who represented retailers nationwide didn't do enough to protect their interests.

Gleeson stepped down from the bench in 2016 and the case is now assigned to U.S. District Judge Margo Brodie.

The court divided the merchants' claims into two separate classes — one that focused on monetary damages and the other on making changes to Visa's and Mastercard's business practices — after it tossed out the earlier settlement.

"The rules-relief class negotiations remain outstanding," Chris Donat, an analyst at Sandler O'Neill & Partners, said in a note to clients. "These changes could include reductions in interchange fees. We believe that this ongoing litigation has the greatest potential risk to future earnings for the U.S. businesses of Visa and Mastercard."

The earlier settlement, once valued at $7.25 billion, was reduced after many of the country's largest retailers, including Starbucks and Lowe's, opted out. Those merchants will have to decide whether to do so again, a move that would reduce the settlement amount.

The total could be cut by as much as $700 million if merchants representing 15 percent of payments volume decide to opt out of the class, according to Tuesday's filing. If merchants representing more than 25 percent leave, the agreement may be terminated.

"Large merchants who opted out of the first settlement and have been ferociously litigating these issues for years are highly likely to opt out and continue with the litigation," said Jeffrey Shinder, an attorney at Constantine Cannon LLP who represents some merchants in their opt-out cases. "They did not fight this long to concede to a settlement that is nothing more than a very, very small monetary payment."

A request filed Tuesday asking Brodie to approve the accord noted the Supreme Court's recent ruling in favor of American Express Co. The Supreme Court in June threw out a years-long lawsuit filed by the U.S. government and 11 states that accused Amex of thwarting competition by prohibiting merchants from steering customers to cards with lower fees.

"The American Express decision also illustrates how a plaintiff can prevail on a complex antitrust claim only to see that favorable trial result overturned after years of appellate and Supreme Court review," lawyers said Tuesday in the court filing.