NEW YORK — MasterCard, the payments processing company, reported a 19 percent increase in its second-quarter profit as more people worldwide used its debit and credit cards to make payments.

The results topped Wall Street expectations, and its shares finished the day modestly higher.

The company's business is growing most strongly in emerging markets. The dollar value of transactions made using debit and credit cards bearing the MasterCard logo rose 17 percent in Latin America and 21 percent in the combined Middle East, Africa and Asia Pacific region. The value of transactions in the U.S. increased 6.5 percent.

"We had a very good second quarter supported by increases in volume and transactions in all regions of the world despite slow economic growth globally," said Ajay Banga, MasterCard president and CEO.

The company, based in Purchase, N.Y., earned $848 million, or $6.96 a share, in the second quarter, which ended June 30. That's up from $700 million, or $5.56 a share, a year ago.

Revenue rose 15 percent to $2.1 billion from $1.8 billion.

Analysts surveyed by FactSet expected earnings of $6.31 a share on revenue of $2 billion.

MasterCard also gave an update of its share buyback program for the current quarter. Through July 25 the company repurchased 296,000 of its own shares, at a cost of $174 million, leaving $1.1 billion under the current program. In the second quarter, the company bought 1.1 million of its own stock at a cost of $581 million.

MasterCard shares rose $9.19, or 1.5 percent, to $610.61 in trading Wednesday after rising as high as $626.23 earlier in the session. That was its all-time high, according to FactSet.

The early gain was tempered by a federal judge's ruling disclosed at midday that struck down a rule setting a cap on the fees that banks can charge merchants for handling debit card purchases.

But the ruling could be bad news for banks and credit card processing companies, such as Visa and MasterCard, which draw a significant amount of revenue from the fees.