Consumer prices in Sweden, measured with a fixed interest rate, fell 0.2% in July from June and were up 8.0% from the same month last year, a decline from an annual rate of 8.5% in the preceding month, the statistics office (SCB) said on Friday.

Analysts had forecast headline inflation of 8.2%

"Lower prices for electricity and fuel contributed to the inflation rate falling for the first time since January," SCB said in a press release.

The outcome is a welcomed relief for the Riksbank, which has seen inflation soar in recent months. Prices - essentially static at the start of 2021 - have been increasing at a higher pace than any time in the last 30 years for the past readings.

Sweden holds a general election on Sept. 11 and any new government faces a delicate balancing act of using Sweden strong public finances to soften the blow consumers face from surging food and energy prices without exacerbating inflation further.

The rapid rise in prices has forced the central bank into a U-turn on policy. It hiked rates by a half-percentage point to 0.75% at its most recent meeting in June and now forecasts the benchmark rate will hit 2% early next year.

The central bank targets 2% CPIF inflation.

CPI inflation was 0.1% on the month and 8.5% on the year.

(Reporting by Johan Ahlander; editing by Niklas Pollard)