Spain's prime minister says the country's economy is on the road to recovery and warns voters they shouldn't take risks when choosing elected leaders in ballots this year.

Mariano Rajoy is defending the record of his conservative Popular Party government amid the emergence of grass-roots movements that are challenging the established parties, including the main opposition Socialists, for power.

Spain reeled from the global financial crisis and Europe's debt crisis, emerging from two recessions at the end of 2013.

Now, the European Union expects Spain to be one of the continent's standout performers, growing by 2.8 percent this year and 2.6 percent in 2016.

Rajoy told supporters in Valencia on Tuesday that Spain has "got over the worst and now we need to persevere. Anything else is playing with fire."