Spain's ruling conservative Popular Party won the most seats in parliament in a general election but lost its absolute majority, partial results showed with over 80% of votes counted.

Prime Minister Mariano Rajoy's Popular Party won 122 seats in the 350-seat assembly, the Socialists came in second with 92 seats and new anti-austerity party Podemos and its allies took 68 seats.

New centre-right party Ciudadanos obtained 38 seats.

An exit poll for public television TVE had earlier put Podemos in second place behind the Popular Party and ahead of the Socialists.

The results will produce a deeply fragmented parliament which will struggle to produce a stable government majority.

With 176 seats required for a majority, only an unlikely collaboration between the Popular Party and the Socialists - or a combination of more than two parties - would produce a stable alliance.

The election came in the midst of a strong economic recovery, with growth projected to surpass 3% this year, and falling unemployment.

But at 21% the jobless rate remains high and there was deep voter concern over mounting inequality and the lack of stable jobs.