Spanish Prime Minister Jose Luis Rodriguez Zapatero's Socialist Party took a clear victory in Sunday's parliamentary elections but remained well short of an absolute majority.
Both the Socialists and the opposition conservative People's Party (PP) increased their number of seats in a sign of the increasing bi-polarization of Spain's political scene.
The Socialist Party had taken a "great victory," organizational secretary Jose Blanco said, describing it as "the triumph of dialogue and respect for pluralism".
The Socialists had 44 percent of the vote and 167 seats in the 350-strong parliament, up from 164 seats in 2004, when 83 percent of the vote had been counted.
Short of an absolute majority, the Socialists remained dependent on the support of smaller leftist and regionalist parties to govern.
The PP took 40 per cent and 155 seats, up from 148 seats in 2004.
The Catalan nationalist formation CiU was running third with 10 seats, followed by the Basque Nationalist Party (PNV) with 6 seats and the far-left Izquierda Unida (IU) with 3 seats.
Voter turnout was estimated at 75 per cent, only slightly beneath the level of 2004, when large numbers of Spaniards went to polls after Islamist train bombings shocked the nation.
The Socialists had feared that many of their traditionally more passive supporters would not vote, but the killing of a former Socialist councillor by the militant Basque separatist group ETA two days before the elections appeared to have mobilized voters.
About 35 million people were eligible to elect 350 members of the lower house of parliament and 208 of the 264 members of the senate.
All the parliamentary parties had called on citizens to use their right to vote in a show of the strength of democracy against terrorist violence.
The defeat of PP leader Mariano Rajoy was his second to Zapatero, who took a surprise victory in 2004 after eight years of conservative rule.
The 2004 result was believed to have been influenced by the Islamist train bombings, which killed 191 people three days before the poll.
Many voters attributed the attack to the then conservative government's alliance with the United States in Iraq and suspected the government of lying when initially blaming the bombings on ETA.
The subsequent legislature was characterized by constant tension between the opposition and the government, with the PP strongly condemning Zapatero's failed attempt to negotiate with ETA.
The electoral campaign was also unusually virulent, with Zapatero and Rajoy accusing each other of lying during two live television debates watched by more than 10 million people.