Visa Inc, MasterCard Inc and banks that issue their credit cards have agreed to a $7.25bn (€6bn) settlement with US retailers in a lawsuit over the fixing of credit and debit card fees.

The settlement is thought to be the largest of its type in US history.

If approved by a judge, the settlement would resolve dozens of lawsuits filed by retailers in 2005.

The card companies and banks would also allow stores to start charging customers extra for using certain credit cards in an effort to steer them toward cheaper forms of payment.

Swipe fees - charges to cover processing credit and debit payments - are set by the card companies and deducted from the transaction by the banks that issue the cards, essentially passing on the cost to merchants, the lawsuits said.

The proposed settlement involves a payment to a class of stores of $6 billion from Visa, MasterCard and more than a dozen of the country's largest banks who issue the companies' cards.

The card companies have also agreed to reduce swipe fees by the equivalent of 10 basis points for eight months for a total consideration to stores valued at about $1.2bn, according to lawyers for the plaintiffs.

The deal calls for merchants to be allowed to negotiate collectively over the swipe fees, also known as interchange fees.

Merchants would also be required to disclose information about card fees to customers, and credit card surcharges would be subject to a cap, according to the settlement papers.

An additional $525m will be paid to stores suing individually, according to the documents.

"This is an historic settlement," said Bonny Sweeney, a lawyer for the plaintiffs. The settlement "will help shift the competitive balance from one formerly dominated by the banks which controlled the card networks to the side of merchants and consumers," said Craig Wildfang, who also represented the plaintiffs.

Noah Hanft, general counsel for MasterCard, said the company believed its interests were "best served by an amicable resolution" of the case.

Visa Chief Executive Officer Joseph Saunders said the settlement was in the best interest of all parties and did not expect the settlement to impact its current guidance.