The Popular Party elected 16 of Spain's 54 lawmakers, down from 24 in the outgoing assembly while the Socialist Party took 14 seats, down from 23 with smaller parties, mainly on the left, making gains.
Polls had predicted a far more modest decline for the two main parties.
The result was seen as a sign of growing voter dissatisfaction with mainstream political parties in Spain as well as of fatigue with Prime Minister Mariano Rajoy's austerity measures and economic reforms.
Podemos, a new left-wing party that was born out of Spain's "Indignant" movement against economic inequality and government spending cuts, did better than polls suggested and captured five seats.
The Internet-fueled movement, which was born with the establishment of a sprawling encampment at Madrid's central Puerta del Sol square in 2011, went on to inspire similar protest from Britain to the United States' Occupy Wall Street.
The Plural Left, a coalition of left-wing parties, won six seats, up from two in the outgoing assembly while the centrist UPyD party won four seats, up from just one.
Turnout was 45.7 percent, up from 44.9 percent in the last European Parliament election in 2009. It had been expected to fall.