WASHINGTON — The overall Consumer Price Index rose 0.4% in January to 211.1, ending three straight months of declines, according to the Bureau of Labor Statistics of the Department of Labor.

On a seasonally adjusted basis, the C.P.I. climbed 0.3 in January, its first month-to-month gain since September 2008. The energy index, which fell 8.3% in December, 17% in November and 8.6% in October, climbed 1.7% in January, its first increase in six months. The index still was 31.4% below its July 2008 peak level, the B.L.S. said.

Meanwhile, the index for food and beverages moved up 0.1%, advancing to 219.3 from 219.2. The index had gained 0.1% in December, 0.2% in November and 0.4% in October.

Within the index for food at home, four of the six major grocery store food groups declined.

For the fifth consecutive month, the index for fruits and vegetables declined, falling 1.3% to 274.3. Fresh fruits fell 2.2% while the fresh vegetables index eased 1.6%.

The next sharpest month-over-month decline occurred in dairy and related products, which fell 0.6% to 209.6. The decline came on the heels of a loss of 0.9% in December. Milk declined 1.4%.

After falling 0.5% in November and 0.2% in December, the index for meats, poultry, fish and eggs fell 0.1% in January to 208.5.

Food at home, which fell 0.2% in December, eased 0.1% in January to 218.9. Despite the decline, the index for food at home has risen 5.7% over the past year.

Cereal and bakery products, which gained 0.5% in December and 0.4% in November, were virtually unchanged in January at 255.7. Year-over-year, the cereal and bakery products index was up 11.3%.

Other food at home climbed 0.6% to 191.7, while the index for nonalcoholic beverages was unchanged.

The other two components of the food and beverage index — food away from home and alcoholic beverages — rose 0.6% and 0.2%, respectively, the B.L.S. said.