NEW YORK — The service sector grew at a better-than-expected pace in May but slower than in April, suggesting that higher prices for food and fuel may be crimping business in retail, entertainment and agriculture.

The Institute for Supply Management said Wednesday that its service sector index was 51.7 in May, following a stronger-than-expected reading of 52 for April. Wall Street economists surveyed by Thomson Financial/IFR had expected a reading of 50.3 in May.

A reading above 50 indicates the sector, which comprises roughly 80 percent of the total economy, is growing, while a reading below 50 indicates contraction.

"It is significant that we've seen this measure manage to stay above the 50 level for the last two months," said Douglas Porter, senior economist at Nesbitt Burns Securities of Chicago. "It suggests the economy has a little bit more resilience than many had expected before."

Thirteen industries reported growth, including entertainment and recreation, real estate, construction, information, public administration, mining, educational services, utilities, hotels, food services and health care. Four industries reported contraction: finance, support services, transportation and agriculture.

"This tells us, that even if we're in recession — something I'm not ruling out — it's a very shallow one," said Bernard Baumohl, executive director, The Economic Outlook Group.

Readings for employment fell, while prices rose for every commodity, from shipping costs to trash can liners.

Federal Reserve Chairman Ben Bernanke, in remarks Tuesday, highlighted worries about increased commodity prices and inflation, signaling the Federal Reserve may hold its benchmark interest rate steady at 2.0 percent at its next meeting June 24-25.

Another worrisome reading in the service report was that inventories rose 7 percent, while order backlogs fell 1 percent. If that imbalance persists, companies may have to cut production or buying as they reduce excess inventories.

The only commodity reported to be in short supply was skilled labor, which didn't surprise Brett Good, Southern California and Arizona district president at Robert Half International, a professional staffing firm.

The market for accountants and technology workers remains tight he said. "Organizations are looking for opportunities to upgrade," he said.

The ISM report gave Wall Street a reason to buy, however. In midday trading, the Dow Jones industrial average rose 64.98, or 0.52 percent, to 12,467.83.

Broader stock indicators also advanced. The Standard & Poor's 500 index rose 7.42, or 0.54 percent, to 1,385.07, and the Nasdaq composite index climbed 30.33, or 1.22 percent, to 2,510.81.