Overall import prices climbed an unexpectedly steep 1.8 percent last month, more than double the revised 0.8 percent gain in September for the steepest monthly increase since a matching 1.8 percent rise in May 2006.
Costs for imported petroleum jumped 6.9 percent in October after rising a revised 4.6 percent in September. That was the largest monthly rise in imported oil prices since an 8.5 percent surge in March.
"Petroleum prices continued an upward trend over the past year, rising 41.4 percent for the 12 months ended in October," the department said.
Prices for U.S. exports also increased at an accelerating rate, rising 0.9 percent in October after a 0.3 percent rise in September. That was the largest rise in export prices in 12-1/2 years, since a 1 percent jump in April 1995.
Higher export prices for both agricultural products like wheat, soybeans, vegetables and corn pushed prices up, but they also rose for non-agricultural items like industrial supplies and materials, the department said.
Both the import and export price rises were far larger than Wall Street economists had anticipated. Analysts polled by Reuters had forecast that import prices would rise 1.1 percent and that export prices would be up 0.3 percent.
There is no sign that energy prices will ease any time soon.
U.S. crude oil prices were in sight of a milestone $100 a barrel on Friday ahead of the winter heating season and consumers already were feeling the pinch in the form of higher gasoline prices.
Trade Gap Shrinks to $56.5 Billion
Meanwhile, the trade gap shrank to $56.5 billion in September, down slightly from a revised estimate of $56.8 billion for August despite a record high price for imported oil.
Wall Street analysts had pegged the trade deficit at $58.5 billion in September, up from the Commerce Department's initial estimate of $57.6 billion for August.