The penalty, announced on Tuesday after a six-year investigation by European antitrust regulators, involves the fees banks charge merchants when purchases are made with credit cards.

Mastercard, regulators said, forced merchants to use only banks in their home countries when processing payments, a requirement that prevented them from shopping for lower fees at banks in other European countries.

The retailers passed the cost of the higher fees on to consumers, leaving them to pay more for their purchases, the commission said.

“By preventing merchants from shopping around for better conditions offered by banks in other member states, Mastercard’s rules artificially raised the costs of card payments, harming consumers and retailers in the E.U.,” Margrethe Vestager, the union’s competition commissioner, said in a statement.

Mastercard, which did not contest the penalty, said in a statement that it had long ago dropped the practice at issue.

“This decision relates to historic practices only, covers a limited period of time of less than two years and will not require any modification of Mastercard’s current business practices,” the statement said.

Mastercard added that the size of the fine was “consistent with the amount previously disclosed by Mastercard that would be taken as a charge” in the fourth quarter of 2018.

When a consumer buys goods with a credit or debit card, the seller’s bank pays a fee to the cardholder’s bank. This so-called interchange fee, based on a percentage of a purchase’s total, is passed on to the retailer.

In Europe, Mastercard required retailers’ banks to apply the interchange-fee rates charged by banks in the country where the retailers were. Even if, for some reason, a retailer used a bank in a different country where rates were lower, those rates did not apply.

The European Commission noted that, as with other business expenses, the cost of the fees helped drive up prices paid by all consumers, even those who did not use cards.

The commission’s investigation found that retailers who accepted Mastercard paid more in bank-service fees than they would have if they had been free to shop around.

A regulation introduced in December 2015 capped interchange fees between countries within the European Economic Area, which includes European Union countries and Iceland, Liechtenstein and Norway. Such fees cannot exceed 0.2 percent of the value of a transaction if a debit card is used, or 0.3 percent if a credit card is used.

The commission noted that Mastercard had cooperated with the inquiry, prompting a 10 percent reduction in the amount it was ultimately fined.