A proposed $7.2 billion settlement between merchants and Visa Inc and Mastercard Inc over credit-card fees was submitted Friday for approval by a federal judge, setting in motion what will be a contentious and closely watched battle over the fate of the potentially historic pact.

If it receives preliminary and then final approval from U.S. District Judge John Gleeson in Brooklyn, it would be the largest federal antitrust settlement in U.S. history, resolving seven years of price-fixing litigation brought on behalf of nearly 8 million merchants.

Visa, Mastercard and banks that issue their cards would pay $6.05 billion and offer $1.2 billion in temporary relief on interchange, or swipe, fees paid by merchants to process credit and debit transactions. The card companies will also revise their no-surcharge rules to let stores charge customers extra for paying with certain cards.

Since it was announced in July, the proposal has been opposed by some of the largest U.S. retailers, including Wal-Mart Stores Inc , and trade groups like the National Retail Federation. Ten of the 19 original stores and trade groups leading the litigation have also come out in opposition. They have argued that the settlement offers no meaningful reform and would force them to give up the right to sue over swipe fees in the future.

Some merchants supporting the settlement, including a group of about 20 mostly large drug-store and grocery chains like Kroger Co , say it would allow them to communicate directly with customers about swipe fees. The credit-card companies also say they are confident it will be approved, bringing an end to their lengthy and expensive litigation with merchants over card fees.

The settlement will be evaluated at two stages: preliminary and then final approval. At both stages, Gleeson will hear from parties both endorsing and objecting to the settlement and will weigh whether it is "fair, reasonable and adequate."

If Gleeson rejects the settlement, the parties will have to resume settlement talks or press on toward trial.

(Reporting by Jessica Dye; Editing by Dan Grebler)