U.S. manufacturing output unexpectedly fell in May as the production of motor vehicles and parts recorded its biggest drop in nearly 2 1/2 years, suggesting sustained weakness in the sector even as the overall economy appears to be gaining momentum.

Other data on Wednesday showed underlying producer prices were subdued last month amid weakness in costs for health services, which suggests inflation could remain tame for a while.

Weak manufacturing and benign inflation, together with a sharp slowdown in job gains last month, will likely encourage the Federal Reserve to leave interest rates unchanged at the end of a two-day policy meeting later on Wednesday.

"The disappointing manufacturing output points to continued sluggishness in this segment of the economy and will likely remain a source of concern at the Fed," said Millan Mulraine, deputy chief economist at TD Securities in New York.

Manufacturing output fell 0.4 percent last month after increasing by a downwardly revised 0.2 percent in April, the Fed said. Economists polled by Reuters had forecast manufacturing production unchanged in May after a previously reported 0.3 percent increase in April.

Motor vehicle and parts production slumped 4.2 percent last month, the largest fall since January 2014. Economists said the drop was likely temporary, citing strong auto sales and well-managed motor vehicle inventories.

There were also declines in the output of machinery and wood products. Manufacturing, which accounts for 12 percent of the U.S. economy, is struggling with the lingering effects of a strong dollar and sluggish overseas demand.

Factories also have been hurt by deep spending cuts on capital projects in the energy sector in response to lower oil prices, as well as efforts by businesses to reduce an inventory overhang.

The manufacturing weakness contrasts sharply with recent fairly strong retail sales and housing data, which suggested the economy had regained speed after growth slowed to a 0.8 percent annualized rate in the first quarter.

Although production at mines rose 0.2 percent in May after eight straight monthly declines, oil and well gas drilling tumbled 7.9 percent.

Glimmers of Hope

There are signs, however, that the worst for the manufacturing sector is over. In a separate report, the New York Fed said its Empire State business conditions index increased 15 points to 6.0 in June as new orders and shipments also swung into positive territory.

"The tone of the Empire State survey suggests that we are moving past the recent weakness in the manufacturing sector," said Daniel Silver, an economist at JPMorgan in New York.

U.S. financial markets were little moved by the data as investors awaited the outcome of the Fed's policy meeting. Prices for U.S. Treasuries rose slightly, while the dollar fell against a basket of currencies. Stocks on Wall Street were trading higher.

The U.S. central bank raised its benchmark overnight interest rate in December for the first time in nearly a decade.

In a third report, the Labor Department said its producer price index for final demand increased 0.4 percent last month as energy costs surged after rising 0.2 percent in April.

In the 12 months through May, the PPI slipped 0.1 percent after being unchanged in April.

A 2.8 percent jump in energy prices accounted for two-thirds of the 0.7 percent rise in the cost of goods in May.

While overall prices for services rose 0.2 percent, healthcare costs slipped 0.1 percent. The cost of doctor visits fell 0.3 percent and home healthcare services dropped 0.9 percent. Economists believe that could translate into soft healthcare costs in the Fed's preferred inflation measure.

As a result of the weak healthcare costs last month, the so-called core PPI, which excludes food, energy and trade services, dipped 0.1 percent in May after rising 0.3 percent in April.

The core PPI was up 0.8 percent in the 12 months through May after increasing 0.9 percent in the 12 months through April.

"The underlying move in producer prices ... points to risks of a more moderate upward path in inflation than expected," said Blerina Uruci, an economist at Barclays in New York.