A container ship at the Port of Oakland in Oakland, California.

U.S. import prices jumped faster than expected in September amid resurgent energy prices but prices excluding fuels were unchanged.

The Labor Department said on Friday import prices rose 0.5 percent last month. That was the largest increase since May and followed a revised 0.4 percent decrease in August.

Import prices were previously reported to have fallen 0.6 percent in August. Economists polled by Reuters had forecast import prices rising 0.2 percent in September.

In the 12 months through September, import prices rose 3.5 percent after a 3.8 percent increase in the 12 months through August.

Last month, prices for imported fuels and lubricants rose 3.8 percent, the largest increase since May, after falling 2.2 percent in August. Food prices advanced 2 percent in September after rising 0.3 percent in the prior month.

Excluding fuels and food, import prices fell 0.1 percent last month after slipping 0.2 percent in August.

The so-called core import prices rose 1 percent in the 12 months through August. The weakness in core import prices likely reflects ongoing dollar strength. The dollar has gained more than six percent this year against the currencies of the United States' main trade partners.

Dollar strength is expected to offset some of an anticipated increase in prices as the Trump administration presses ahead with tariffs on nearly all Chinese imports.

U.S. President Donald Trump imposed tariffs on nearly $200 billion of Chinese imports last month and then threatened more levies if China retaliated. China then hit back with tariffs on about $60 billion of U.S. imports.

On Thursday, Trump warned there was much more he could do that would hurt China's economy.

The report also showed export prices were unchanged in September after declining 0.2 percent in August. Prices for agricultural products fell 1.4 percent last month.

Export prices rose 2.7 percent on a year-on-year basis in September after rising 3.5 percent in August.

WATCH: Here's what drives the price of oil