Import prices rose for an eighth straight month in May despite a drop in fuel costs, with the year-on-year increase reaching its highest level in nearly three years, according to data on Friday.

The Labor Department said import prices climbed 0.2 percent last month, confounding forecasts for a 0.7 percent decline and following April's revised 2.1 percent jump. In the year to May, import prices surged 12.5 percent, the largest gain since September 2008.

This is simply reflecting the increase in import petroleum prices, said Anthony Karydakis, senior U.S. economist at Commerzbank AG. Excluding petroleum, import prices have been very subdued.

The trend of higher energy prices was already being reversed with petroleum import prices falling 0.4 percent in May, the first decline since September 2010.

Overall export prices rose 0.2 percent after a downwardly revised 0.9 percent gain. Analysts had been looking for a 0.3 percent gain.

The data hinted at ongoing price pressures from overseas, but also suggested the recent decline in oil and commodity prices will soon translate into some relief for businesses in the form of lower costs.

Officials at the U.S. Federal Reserve, most recently New York Federal Reserve president William Dudley on Friday, have argued that the rapid rise in energy prices seen earlier in the year would be transitory, and therefore should not prove inflationary over the medium term.

Until late last year, policymakers had been concerned about the prospect of deflation, a damaging downward spiral in prices and wages. But since the launch of the Fed's $600 billion bond-buying program, overall inflation has firmed significantly.

U.S. consumer prices rose 3.2 percent in the year to April. But outside food and energy, the CPI climbed just 1.3 percent, below the central bank's presumed target of 2 percent or a bit below.

Last month's easing in fuel costs is expected to have helped temper U.S. inflation. A government report due on Wednesday is expected to show consumer prices rose a slim 0.1 percent in May. Outside food and energy, prices are seen up a still-mild 0.2 percent.

The year-on-year gain in overall inflation is expected to tick up to 3.3 percent, with the core price increase rising to 1.4 percent.

(Additional reporting by Emily Stephenson and Richard Leong, Editing by Chizu Nomiyama)