"When you have more votes and seats you have to strengthen the capacity for dialogue and that's my proposal," Prime Minister Jose Luis Rodriguez Zapatero said at his first press briefing a day after an election that highlighted the country's deep political divide.
"This legislature must have as its principal aims new drives in the economy, employment and social policies, and the method will be dialogue and social agreements," he said.
Zapatero's Socialists won 169 seats in the lower house of Parliament, compared to 153 for the conservative opposition Popular Party headed by Mariano Rajoy.
The victory, although an improvement of five seats for the Socialists from the 2004 election, left the party seven seats short of a majority in the 350-seat parliament and in need of some form of an alliance with smaller parties in order to govern.
An offer of help came quickly from the Basque Nationalist Party, which won six seats.
"We hope to contribute to his (Zapatero's) government so that together we can find a definitive solution to the Basque country's political problems," said party president Inigo Urkullu.
Zapatero said he welcomed the offer but added it was too early to talk about pacts.
The Socialists are not expected to form a coalition government but to rely on the ad-hoc support in parliament from smaller parties on individual bills and policies, as the Socialists did in the previous legislature.
"The Socialist Party is closer to the absolute majority and it doesn't have to envisage making many deals to form a government," said Carlos Malo, director of the Sigma Dos polling firm.
"I believe this is going to be good for him (Zapatero)," Malo added. "It's going to give him more stability."
The Madrid Ibex stock market was seen to welcome the result, rising 1 percent on its first day of trading following the vote.
The prime minister has promised tax breaks for the poor and further investment in infrastructure to absorb some of those laid off due to a slowing construction sector.
The election victory also came amid growing concerns over resurgent Basque separatists.
Zapatero said it was too soon to talk of a possible new pact with the Popular Party to fight terrorism similar to one that existed in previous legislatures but which fell apart acrimoniously in the last legislature as the Popular Party opposed parliament's backing for talks with the armed group ETA.
"We have to wait a bit," said Zapatero. "The unity of democrats against terrorism is always very positive."
"We will work step by step, talking, facing what's ahead of us and, of course, listening to the different parties involved," added.
The election was held in the wake of the slaying on Friday of a former Socialist party councilor, Isais Carrasco, by suspected Basque militants.
In his victory speech, Zapatero paid tribute to Carrasco, saying he should have been celebrating the victory with his family.
Carrasco was buried Saturday, a day before the vote. Town halls across Spain honored him at noon Monday by holding five-minute silent vigils.
ETA has killed some 825 people since the late 1960s. Late last year, it blamed Zapatero for a lack of progress in peace talks.
The timing of the attack on Carrasco was reminiscent of an election-eve massacre by Islamic militants who killed 191 people in a string of bombings against commuter trains in Madrid on March 11, 2004. Three days after that attack, Zapatero won a surprise victory amid a wave of voter outrage at the ruling conservatives, who blamed the attacks on ETA even as evidence of Islamic involvement mounted.
The Popular Party conceded defeat, but took consolation in the fact that it also picked up seats.
Rajoy - who is likely to be under increasing pressure to step down as party chief following his second straight defeat - made no public appearance Monday, leaving it to his deputy, Angel Acebes, to address the future of the party.
Acebes said the Popular Party was "proud" of Rajoy's leadership, but declined to say whether he would stay on as its leader. He said the PP leadership would meet Tuesday to discuss its future and that Rajoy would speak afterward.
Overall, the results were a firm endorsement of Zapatero's policies, which included reforms such as legalizing gay marriage and granting on-demand divorce, once thought unthinkable in the overwhelmingly Roman Catholic country.
Zapatero also withdrew Spanish troops from Iraq after he was first elected in 2004 and launched a drive to cede more power to Spain's semiautonomous regions.