McDonald's Corp reported a higher-than-expected quarterly profit on Friday as low prices brought in strong sales in Europe and the United States. The company's share price rose 3.1 percent.

June sales at restaurants open at least 13 months were far stronger than analysts expected. During the month, same-restaurant sales were up 6.9 percent in the United States, 9.1 percent in Europe and 4.8 percent in the Asia/Pacific, Middle East and Africa unit.

Analysts were expecting June same-restaurant sales to rise 2 percent in the United States, 3 percent in Europe and 2 percent in the Asia/Pacific, Middle East and Africa unit.

Europe is McDonald's largest market for sales, contributing about 40 percent of revenue. The United States is a close second.

It's the consistency of the everyday value message that has helped them a lot, said Lazard Capital Markets analyst Matthew DiFrisco, who added that McDonald's is good at adjusting its marketing to keep customers coming in.

McDonald's has been taking market share from its fast food peers for many months. It has benefited from improving food quality, adding Dollar Menu items and introducing high-margin beverages such as coffee and fruit smoothies to broaden its appeal beyond the young men who account for the biggest share of sales at most other fast-food chains.

It is also renovating restaurants in Europe and the United States.

Europe's top performers were France, Britain and Russia.

Broadly speaking, there was just a little bit of a lift in people's willingness to spend in Europe, said Bernstein Research analyst Sara Senatore.

McDonald's global same-restaurant sales rose 5.6 percent in the second quarter. It forecast July results that are up 4 percent to 5 percent overall.

Janney Capital Markets analyst Mark Kalinowski, who correctly signaled that the June U.S. result would be significantly above what many analysts were targeting, said some key competitors are floundering.

In particular, he said, Carrols Restaurant Group -- one of privately held Burger King's biggest franchisees -- saw same-restaurant sales at its Burger King restaurants fell 3.6 percent in the second quarter.

Rival Yum Brands Inc recently reported another quarter of strong earnings based on growth in China, but its U.S. Taco Bell business is hurting from a dismissed lawsuit over the quality of its ground beef.

Shares in Yum, also the parent of the KFC and Pizza Hut chains, were up 0.4 percent. Stock in burger chain Wendy's was up 1.3 percent.

Shares of McDonald's, which has 32,000 restaurants, were up $2.69 to $89.22 on the New York Stock Exchange in the middle of the trading day. The shares closed at an all-time high of $86.54 on Thursday.

HOLDING THE LINE ON PRICES?

Second-quarter net income rose 15 percent to $1.41 billion, or $1.35 per share, topping the average analyst forecast of $1.28 per share, according to Thomson Reuters I/B/E/S.

Foreign currency translation boosted earnings by 10 cents per share in the second quarter.

Revenue rose to $6.91 billion from $5.95 billion.

Analysts said the strong results showed that McDonald's has pricing power.

We will continue to consider future price increases, McDonald's Chief Financial Officer Peter Bensen said on a conference call with analysts.

McDonald's has raised prices on some premium products to help offset higher food costs. The company still expects those costs to rise 4 percent to 4.5 percent in the United States and Europe this year.

McDonald's wants customers to keep coming through its doors, so Bensen said it would be judicious with additional price hikes.

You can bet their competitors wish they would take pricing, said Victory Capital Management analyst Dave Kolpak. You can't do it if McDonald's doesn't. They're putting the heat on the competition.

(Editing by Gerald E. McCormick and Lisa Von Ahn and Matthew Lewis)