Voters in the troubled Basque region came out in support of greater independence from Madrid in Sunday's poll, but delivered a defeat to the militant Basque nationalists.
The moderate Basque Nationalist Party (PNV) - already in coalition with pro-independence Eusko Alkartasuna (EA) - secured 33 of 75 parliamentary seats but may have difficulty forming a government in the absence of an overall majority.
The party has so far refused to contemplate sharing power with the party allied to the separatist group ETA - Euskal Herritarok (EH) - and may pursue an alliance with the socialists.
Analysts say EH could be crucial in forming a government, or in preventing other parties from doing so.
Hardliners marginalised
But a BBC correspondent in the Basque capital, Vitoria, says the most dramatic result is that EH has seen its number of seats drop by half.
Analysts say voters have punished the movement for failing to condemn ETA after a bitter election campaign overshadowed by violence from the separatist group.
The outgoing head of the Basque Government, Juah Jose Ibarretxe, said the victory had "opened the door to dialogue and peace" by marginalising hardline nationalists.
"The message could not be clearer. The Basque citizens have said overwhelmingly: 'We do not want more dead,'" he said.
The victorious PNV's president, Xabier Arzalluz, said: "The road to peace starts now."
The elections saw a record turnout of nearly 80% - the highest since the region was granted limited autonomy in the early 1980s.
Violence
ETA - which has killed some 800 people during its 33-year armed struggle for an independent Basque homeland - showed it was still a force to be reckoned with by exploding a car bomb in central Madrid on Friday.
Coinciding with the end of campaigns at midnight on Saturday, a powerful car bomb exploded in one of central Madrid's busiest streets, injuring 13 people.
Another attack has been attributed to ETA, the fatal shooting of a senior PP politician a week ago.
The group has been blamed for 30 deaths since calling off a 14-month truce in November 1999.