* Producer price index increases 0.5 percent in May
* PPI rises 3.1 percent year-on-year
* PPI excluding food, energy, trade gains 0.1 percent
WASHINGTON, June 13 (Reuters) - U.S. producer prices increased more than expected in May, leading to the biggest annual gain in nearly 6-1/2 years, but underlying producer inflation remained moderate.
The Labor Department said on Wednesday its producer price index for final demand rose 0.5 percent last month, boosted by a surge in gasoline prices and continued gains in the cost of services. The PPI edged up 0.1 percent in April.
In the 12 months through May, the PPI increased 3.1 percent, the largest advance since January 2012. Producer prices rose 2.6 percent year-on-year in April. Economists polled by Reuters had forecast the PPI gaining 0.3 percent from the prior month and rising 2.8 percent from a year ago.
A key gauge of underlying producer price pressures that excludes food, energy and trade services nudged up 0.1 percent last month. The so-called core PPI rose by the same margin in April. In the 12 months through May, the core PPI rose 2.6 percent after advancing 2.5 percent in April.
The dollar pared losses against a basket of currencies after the data while U.S. Treasury yields rose. U.S. stock index futures were trading higher.
Federal Reserve officials were due to resume their two-day policy meeting and are expected to raise interest rates for a second time this year later on Wednesday, encouraged by steadily rising inflation and a rapidly tightening labor market.
The renewed upward trend in producer prices strengthens expectations that inflation will pick up this year and likely breach the U.S. central bank's 2 percent target.
Regional factory surveys have shown an acceleration in raw material prices this year. So far, manufacturers have not passed on these higher costs to consumers. A report on Tuesday showed monthly consumer prices rising moderately in May.
The Fed's preferred inflation measure, the personal consumption expenditures (PCE) price index excluding food and energy, increased 1.8 percent year-on-year in April after a similar gain in March.
In May, prices for goods surged 1.0 percent, accounting for 60 percent of the rise in the PPI. Goods prices were unchanged in April. In May, they were boosted by a 9.8 percent jump in the price of gasoline. Wholesale gasoline prices slipped 0.4 percent in April.
Prices for steel mill products surged 4.3 percent in May, the largest rise since February 2011, likely reflecting steel import tariffs imposed in March by the Trump administration. The cost of these products could rise further after the government this month widened the duties to steel imports from the European Union, Canada and Mexico.
Wholesale food prices edged up 0.1 percent last month after declining 1.1 percent in April. Excluding foods and energy, goods prices increased 0.3 percent, rising by the same margin for a third straight month.
The cost of services increased 0.3 percent after nudging up 0.1 percent in April. Services were driven by a 0.9 percent rise in margins for trade services.
The cost of healthcare services ticked up 0.1 percent after falling 0.2 percent in April. Those costs feed into the core PCE price index. (Reporting By Lucia Mutikani; Editing by Andrea Ricci)