The Swedish economy shrank in the second quarter, primarily due to slower exports and decreased trade inventories, though the contraction was smaller than expected, data from the Statistics Office showed on Tuesday.

Gross domestic product (GDP) was down 0.8% from the previous three months, against a flash estimate from last month for a 1.5% fall and a mean estimate in a Reuters poll of analysts for a 1.3% drop.

Year-on-year, GDP was down 1.0%, the agency said in a statement. Its preliminary reading had been for a 2.4% drop.

Over the preceding quarters the economy has been relatively strong despite surging inflation, higher interest rates, a shaky property market and global uncertainties. In 2022, it expanded 2.8%.

"The second quarter of 2023 was generally weak with declines in several of the main components of GDP. Net exports decreased, as did investments in inventories," the agency said.

"Household consumption expenditure was negative for the fourth consecutive quarter," it added.

The central bank has raised its policy rate to 3.75% from 0% last year. While inflation has started to slow and the economy is cooling, it is seen hiking again in September and possibly also in November fearing inflation will get stuck above target.

"The outcome does not change our view that the Riksbank will hike twice during the autumn," analysts at SEB said in a note to clients on the GDP data.

The central bank in June forecast a drop of 0.5% in 2023 and flagged at least one more rate hike this year.

"The sluggish growth is definitely an argument for the Riksbank to proceed with caution, but the too high inflation and in particular the weak crown means that the Riksbank will still hike rates in September," Nordea analysts said.

The government last week lowered its GDP forecast for this year to see a 0.8% contraction. (Reporting by Anna Ringstrom, editing by Terje Solsvik, Andrew Heavens and Ed Osmond)