WASHINGTON — The Consumer Price Index for food and beverages advanced 0.2% in August, finishing at 237.3, according to the Bureau of Labor Statistics of the Department of Labor. The increase follows two consecutive months of gains of 0.1%. The food index also increased 0.2% in August, moving up to 237.4 from 237 in July.

Within food at home, four of the six major grocery store food group indexes increased in August. This compared with July when only two of the six indexes increased.

The index for fruits and vegetables again finished sharply higher, rising 1.2% after a 1.5% increase in July. Meanwhile, the index for meats, poultry, fish, and eggs increased for the third month in a row, rising 0.6% in August after increasing 0.2% in July.

The index for dairy and related products rose 0.4% in August. This came after the index had declined in each of the previous three months.

The cereals and bakery products index followed up a decline of 0.3% in July by increasing 0.3% in August, the B.L.S. said.

In contrast to the gains, the index for other food at home fell 1% in August, its largest month-over-month decline since 2002, and the index for nonalcoholic beverages fell 0.1%.

Over the past 12 months, the food at home index has risen 1%. The index for fruits and vegetables has posted the largest increase over that time, rising 3.6%, the B.L.S. said.

The overall Consumer Price Index advanced for the fourth consecutive month, increasing 0.1% in August after rising 0.2% in July. Over the past 12 months, the index has increased 1.5%.