Consumers continued to feel the pinch at grocery stores and gasoline stations in April as higher prices pushed up a widely used index of inflation to the fastest 12-month pace since the later part of 2008, according to government figures released Friday.

The Labor Department said in its monthly report that the Consumer Price Index, the most widely used measure of inflation, was up 0.4 percent in April from March, and up 3.2 percent from a year earlier. The 12-month figure represents the biggest jump in the index in any 12-month period since October 2008.

Analysts had forecast the same monthly rise but a slightly smaller increase for the year, at 3.1 percent.

Food and gasoline price rises accounted for most of the increases, with gasoline accounting for almost half of the month-to-month rise.

Food prices were up 0.4 percent in April, smaller than the 0.8 percent rise in March as prices for fresh vegetables slowed their advance. Energy prices rose 2.2 percent in April, the 10th consecutive monthly increase, although the rise was smaller than the jumps of 3.5 percent in March and 3.4 percent in February, the report said.

Gasoline prices were up 3.3 percent in April. According to the report, energy prices have risen 19 percent over the past 12 months, with gasoline prices up 33.1 percent.

Consumers are "painfully aware" that if high energy and food costs continue, "the cost of living is going to go up," said Stuart Hoffman,