With 99.30 per cent of the votes counted as of Sunday night, the Socialist Party won 28 per cent of the votes, compared with 28.67 per cent in April, which translated into 120 seats in the 350-seat congress, compared with the 123 they won six month ago, reports Xinhua news agency.
The conservative Peoples' Party improved on their April performance, winning 20.81 per cent of the votes and 88 seats, compared with their record low of 16.69 per cent and 66 seats in the previous elections.
The big winner was Vox, which won 15.10 per cent of the vote and 52 deputies, compared to 10.26 per cent and 24 seats in the April vote.
"Eleven months ago we didn't have any representation in any institution, now we are the third party in Spain," said Vox leader Santiago Abascal.
The PP and Vox both benefited from the almost total collapse of the centre-right Ciudadanos party, whose support fell from 15.86 per cent to just 6.79 per cent, with the number of deputies gained reduced from 57 to 10.
Ciudadanos party leader Albert Rivera announced a meeting of the party's executive committee, during which he said he would "assume all of the decisions that the party executive takes".
The left-wing party Unidos Podemos also suffered a setback, seeing its number of deputies fall to 35 from 42, although this was slightly offset by the arrival of the new left-wing party Mas Pais, which claimed three seats.
Voters on Sunday headed to polling stations again to cast their ballots in the second general election of the year in an attempt to break a political deadlock.
The election, fourth in four years, was necessitated after the PSOE fell short of a majority and was unable to form a coalition. The last polls were held in April.
Sunday's general election was the 14th since Spain's return to democracy under the 1978 Constitution.
( With inputs from IANS )