WASHINGTON — U.S. consumer prices edged up 0.2 percent in August as a surge in medical care offset flat readings for food and energy.

The result follows an unchanged figure in July. Core inflation, which excludes the volatile categories of food and energy, rose 0.3 percent, the Labor Department reported Friday. It was the biggest monthly increase since February. The climb in core inflation was led by a record jump in drug prices and the biggest rise in doctor and hospital charges in a quarter-century.

Over the past 12 months, core inflation is up 2.3 percent but overall inflation has risen a more moderate 1.1 percent, still well below the Federal Reserve’s 2 percent target for annual increases in inflation.

The Fed meets next week and is expected to keep its key interest rate unchanged at a near-record low of 0.25 percent to 0.5 percent. The Fed raised rates by a quarter-point last December but since then, officials have held off on further rate hikes, reflecting concerns about sluggish economic growth and periodic turbulence in financial markets.

Economists believe the Fed’s next rate hike will not come until December. Steve Murphy, U.S. economist at Capital Economics, said the latest report on consumer inflation is unlikely to alter that view.

“Domestic price pressures continue to build, but only very gradually,” he wrote in a research note.

The rise in core inflation in August was led by a record 0.9 percent rise in drug prices and a 0.9 percent jump in the cost of medical services such as doctor visits and hospital stays. It was the biggest one-month rise in this category since November 1990.

Food costs were unchanged in August, with the category that covers meat, poultry, fish and eggs falling for the 12th month in a row.

Energy costs were also flat in August as gasoline dropped by 0.9 percent. The decline was offset somewhat by a rise in electricity and natural gas prices.

Housing and rental costs were up 0.3 percent in August and have risen 3.4 percent over the past year. Medical care services are up 5.1 percent, the biggest increase for any of the major categories.