A customer wearing a face mask purchases meat on a shelf at the Edeka Zurheide supermarket in Duesseldorf, western Germany, on April 29, 2020. (INA FASSBENDER / AFP)

BERLIN – German inflation rose to its highest level in almost 50 years in August, beating a previous high set only three months earlier, as energy prices drove up inflation, data showed on Tuesday.

Energy prices in August were 35.6 percent higher compared with the same month the previous year, while food prices had increased 16.6 percent year-on-year, said the statistics office

Consumer prices, harmonized to make them comparable with inflation data from other European Union countries, increased by 8.8 percent on the year, following an unexpected 8.5 percent rise in July, the federal statistics office said.

READ MORE: ECB policymakers make the case for a big rate hike

German inflation rose by 8.7 percent in May, which had been the first time since the winter of 1973/1974 that inflation had been so high, according to the statistics office. The annual HICP reading for August was in line with a Reuters poll of analysts who predicted a rise of 8.8 percent.

Energy prices in August were 35.6 percent higher compared with the same month the previous year, while food prices had increased 16.6 percent year-on-year, said the statistics office.

August's rise includes measures meant to stifle inflation, including cheaper public transit tickets and a fuel tax cut.

ALSO READ: Weaker German, French data compound energy and euro woes