Spain's gross domestic product grew 5.5% in 2022 after a faster-than-expected 0.2% quarterly growth in the fourth quarter, preliminary data from the National Statistics Institute showed on Friday.

The economy in the fourth quarter expanded 2.7% compared with the same period a year earlier, INE said.

Spain's economy recorded a seventh consecutive quarterly expansion and avoided a recession in the autumn, despite a global economy cooling and the contraction of private consumption.

Previous quarters were revised upwards by the INE, whose data have exceeded expectations of analysts polled by Reuters who had forecast 0.1% quarter-on-quarter growth and 2.2% year-on-year expansion.

During the past month, Spanish government officials had anticipated that 2022 economic growth would surpass the original 4.5% forecast and had likely surpassed 5%. Madrid expects the GDP growth will slow down to 2.1% in 2023, though analysts expects lower growth.

Unemployment data released on Thursday showed an increase of jobless rate in the last three months of 2022.

Public spending drove the economy in the last quarter of the year, compensating for the contraction in private consumption and investment.

Spain has already received 31 billion euros ($33.69 billion) of European recovery funds, which started to flow into the economy in the last quarter and the government expects them to reach their full potential in 2023.

($1 = 0.9202 euros) (Reporting by Belén Carreño and Marta Serafinko, editing by Inti Landauro and Christina Fincher)