U.S. consumer prices rose a surprisingly large 0.7 percent in January but costs outside of food and energy were up just 0.2 percent as expected, suggesting underlying inflation remains tame, a report by the Labor Department showed Wednesday.

Economists had forecast consumer prices would climb 0.5 percent last month after December's unexpected 0.1 percent decline. But a surge in the cost of gasoline, electricity, food and transportation more than offset a drop in the price of home heating oil and a moderation in the cost of lodging away from home.

Over the past year, consumer prices have climbed 4.0 percent, the largest 12-month increase since October 2005 and an acceleration from December's 3.4 percent increase. The rise in consumer prices since January 2005 is also well above the 3.6 percent increase in average weekly earnings in the same period — meaning consumer budgets are not keeping pace with rising prices.

On a year-over-year basis, core prices were up 2.1 percent, however, a slowdown from December's 2.2 percent increase and in-line with Wall Street forecasts.

The rise in overall consumer prices in January was driven by a 5.0 percent increase in energy costs, a 0.5 percent gain in food prices and a 1.8 percent surge in the cost of transportation, the Labor Department report showed.

Gasoline prices rose 6.4 percent, electricity prices advanced a record 5.5 percent and natural gas prices were up 1.7 percent last month. That was only slightly offset by a 1.9 percent decline in the cost of fuel oil.

In a separate report, the Labor Department said real average weekly earnings fell 0.2 percent in January, the first decline since September, after a 0.5 percent gain in December. Average weekly earnings have risen 3.6 percent from January 2005, but since inflation has risen even faster, real earnings remain 0.4 percent lower than a year earlier.