US producer prices rose by more than expected in January, recording their largest gain in more than four years amid increases in the cost of energy products and some services.

However a strong dollar has continued to keep underlying inflation tame.

The US Labor Department has said its producer price index for final demand jumped 0.6% last month. That was the largest increase since September 2012 and followed a 0.2% rise in December.

Despite the surge, the PPI only increased 1.6% in the 12 months through January. That followed a similar gain in the 12 months through December. 

Economists polled by Reuters had forecast the PPI rising 0.3% last month and the year-on-year increase moderating to 1.5%.

The US dollar pared losses against a basket of currencies after the data. Prices of US Treasuries were mixed while US stock index futures were largely flat.

The rise in producer prices comes as manufacturers report paying more for raw materials. The Institute for Supply Management's prices index surged in January to its highest level since May 2011. The ISM index, which is closely correlated to the PPI, has increased for 11 straight months.

The gains in PPI last month largely reflected increases in the prices of commodities such as crude oil, which are being boosted by a steadily growing global economy. Oil prices have risen above $50 per barrel.

But with the dollar strengthening further against the currencies of the United States' main trading partners and wage growth still sluggish, the spill over to consumer inflation from rising commodity prices is likely to be limited.

A government report on Friday showed import prices excluding fuels fell in January for a third straight month. Data tomorrow is expected to show the consumer price index increased 0.3% in January after a similar gain in December, according to a Reuters survey of economists.

Last month, prices for final demand goods increased 1%, the largest rise since May 2015. The gain accounted for more than 60% of the increase in the PPI. Prices for final demand goods advanced 0.6% in December.

Wholesale food prices were unchanged last month after climbing 0.5% in December. Healthcare costs rose 0.2%. Those costs feed into the Fed's preferred inflation measure, the core personal consumption expenditures index.

The volatile trade services component, which measures changes in margins received by wholesalers and retailers, shot up 0.9% in January after being unchanged in the prior month.

A key gauge of underlying producer price pressures that excludes food, energy and trade services rose 0.2%. That followed a 0.1% gain in December. The so-called core PPI increased 1.6% in the 12 months through January, slowing from December's 1.7% gain.