NEW YORK — American Express did not violate antitrust laws by barring merchants from asking customers to use one credit card over another and steering consumers to another form of payment, a federal appeals court said Monday.

The 2nd Circuit Court of Appeals in Manhattan tossed out a lower-court ruling, saying a Brooklyn judge erred in his February 2015 decision by focusing entirely on the interests of merchants rather than cardholders.

It said American Express seemed to get its market share based on its rewards programs and perceived prestige and “there is no reason to intervene and disturb the present functioning of the payment-card industry.” To do so, it said, likely would increase the market shares of Visa and MasterCard at the expense of American Express, whose card members tend to be more affluent than its competitors’ customers.

The written decision by a three-judge panel came in a lawsuit brought in 2010 by the U.S. government and 17 states against American Express, Visa and MasterCard. The lawsuit said that letting merchants steer customers to cards with lower fees for merchants or to other preferred cards would benefit consumers and increase incentives for networks to reduce card fees.

Visa and MasterCard entered into consent judgments in 2011 and stopped their anti-steering rules for merchants while American Express proceeded to trial.

At a seven-week juryless trial, the American Express Co. argued its policies kept it competitive against the large payment networks of Visa and MasterCard and their bank partners. U.S. District Court Judge Nicholas Garaufis ruled against American Express, finding that the company was violating antitrust laws and had reduced the incentive for credit card companies to compete on price. The judge blocked the company from enforcing its anti-steering rules for a decade.

Central to the case were the fees merchants pay to process credit and debit card transactions. Those fees are largely hidden from the average consumer but are a major cost for merchants that accept credit cards. Consumers sometimes indirectly pay more for products and services as merchants pass the cost along.

The 2nd Circuit noted that credit card issuers sometimes may increase the fee charged to merchants so they can boost cardholder benefits and effectively decrease prices for cardholders.

The appeals court noted that a third of the nation’s merchants don’t accept American Express cards as it described how businesses decide which cards to accept based on their costs and what benefits each card will provide.

It said the rules American Express imposed on merchants to prevent them from steering customers to a particular form of payment “prevent a merchant from seeking high-end clientele by advertising acceptance of Amex cards but then, at the critical point of sale, offering that clientele a discounted price for not using the Amex card.”

“In this case, we see no monopolistic danger in this purpose,” the 2nd Circuit said.

Lawyers on both sides did not immediately return messages seeking comment.

The 17 states that joined the lawsuit are Maryland, Missouri, Vermont, Utah, Arizona, New Hampshire, Connecticut, Iowa, Michigan, Ohio, Texas, Illinois, Tennessee, Montana, Nebraska, Idaho and Rhode Island. The lawsuit had sought a finding that American Express’ actions violated anti-trust laws.