A truck transports a Maersk BV shipping container through the Port of Philadelphia in Philadelphia, Pennsylvania.

U.S. import prices increased more than expected in April amid rising costs for petroleum products and a range of other goods, which could help boost domestic inflation.

The Labor Department said on Wednesday that import prices jumped 0.5 percent last month after an upwardly revised 0.1 percent gain in March. Import prices have now increased for five straight months.

Economists polled by Reuters had forecast import prices increasing 0.2 percent in April after a previously reported 0.2 percent drop in March.

In the 12 months through April, import prices rose 4.1 percent, slowing from March's 4.3 percent increase. Import prices shot up 4.7 percent on a year-on-year basis in February, the biggest gain in five years.

In April, prices for imported petroleum rebounded 1.6 percent after declining 0.4 percent in March. Import prices excluding petroleum gained 0.4 percent, the biggest increase since July 2016, after edging up 0.1 percent in the prior month.

Import prices excluding petroleum have now increased for four straight months, in part reflecting an ebb in the U.S. dollar's rally. Import prices excluding petroleum rose 1.4 percent in the 12 months through April, the largest increase since March 2012.

The steady rise in underlying import prices could over time put upward pressure on consumer inflation.

Prices for imported capital goods nudged up 0.1 percent, rising for a third straight month. The cost of imported motor vehicles surged 0.5 percent, the biggest gain since April 2012.

Prices for imported consumer goods prices excluding automobiles rose 0.1 percent, while the cost of imported food increased 0.3 percent.

The report also showed export prices increased 0.2 percent in April after rising 0.1 percent in March. Export prices rose 3.0 percent year-on-year after increasing 3.4 percent in March.

Prices for agricultural exports advanced 0.3 percent last month as a 37.9 percent jump in vegetable prices offset falling prices for soybeans, corn and wheat.