Germany's annual inflation rate has declined slightly for the second straight month, official data showed on Thursday, but July's 7.5% rate is still within sight of the nearly half-century high hit in May, AP reported.

Inflation in Europe's largest economy rose 7.9% year-over-year in May, the highest level since the early 1970s, and fell to 7.6% last month.

This month, energy prices rose by 35.7% compared to the same period last year, while food prices rose by 14.8%.

In early June, Germany temporarily cut taxes on diesel and gasoline and introduced a super-cheap ticket that allows people to use all types of local and regional public transport for 9 euros a month. These measures will be in effect for three months. The statistical office said that it is not yet clear to what extent they contain inflation.

German Chancellor Olaf Scholz intends to work with trade unions and employers to find ways to solve the problem of rising prices and prevent an inflationary spiral.

The statistical office of the European Union on Friday will publish data on the inflation rate in July for all 19 countries using the euro, after several consecutive months of record highs. In June it reached 8.6%.