Reports variously gave the PP and PSOE between 38 and 41% each, which would translate to 152-161 seats in the 350-seat parliament.
Two television stations, commercial channel Antena 3 and state-run TVE, gave the Socialists around 41% of the vote.
Antena 3 predicted the PP had 38.5% , whereas TVE estimated the ruling party had 36.9%. Also giving the PSOE a larger vote share of between 40.5% and 41.4 % was the Opina polling institute for Radio Cadena Ser.
But a Demoscopia poll for private broadcaster Telecinco gave the PP 40.6% to 38.3% for the Socialists.
Under all of the polls quoted, neither party seemed likely to
manage to win an absolute majority - requiring 176 seats - which the PP had been defending.
Voters, many wearing the black ribbon symbols of national grief since Thursday's attack, turned out in numbers well above the last election in 2000 amid an angry debate over who was behind the bombings - al-Qaida or Basque separatists.
The exit polls suggested the Socialists had done much better
than expected and that no single party would emerge with an
absolute majority in parliament, meaning whoever wins most seats will probably need help from another party to form a government.
Analysts had warned the PP could be rocked if voters believed Usama bin Laden's al-Qaida had mounted its first attack in Europe and in reprisal for Spain's support for the US-led war in Iraq that most Spaniards opposed.