Consumer prices in Spain resumed their upward trend, rising 6.1% year-on-year in February, a faster pace than the 5.9% during the 12 months to January, and above the 5.7% expected by analysts polled by Reuters, preliminary data from the National Statistics Institute (INE) showed on Tuesday.

After Spain contained price growth in the second half of 2022, registering the lowest figure in the euro zone by the end of the year, the country's inflation has now risen for two consecutive months in annual terms.

Higher electricity and food prices were the main drivers of the increase, INE said.

Core inflation, which strips out volatile fresh food and energy prices, was 7.7% year-on-year, a higher rate than the 7.5% recorded in January, the INE data showed.

Spain's European Union-harmonised 12-month inflation was 6.1%, up from 5.9% in January and above the 5.5% expectation from analysts polled by Reuters.

The monthly change in prices over January was 1%.

(Reporting by Joao Manuel Mauricio in Gdansk and Belén Carreño in Madrid, editing by Inti Landauro and David Latona)