April 29 (Reuters) - Spain's European Union-harmonised inflation rate stood at 3.4% in the 12 months through April, up from 3.3% in the year through March driven by rising food and gas prices, preliminary data from the National Statistics Institute (INE) showed on Monday.

The higher reading is mainly due to the increase in gas prices compared with last April, as the government discontinues measures taken to ease the pain of inflation after the war in Ukraine broke out. Food prices increased more than in the same period last year, INE said.

The 12-month harmonised inflation was above the 3.3% expected by analysts polled by Reuters.

Core inflation, which strips out volatile fresh food and energy prices, rose 2.9% in the 12 months through April, down from 3.3% in the previous month, INE said.

Spanish 12-month national consumer price index rose 3.3% through April, up from 3.2% in March. (Reporting by Joao Manuel Mauricio in Gdansk, editing by Inti Landauro and Pietro Lombardi)