With 99.9 percent of the votes counted, Prime Minister Jose Luis Rodriguez Zapatero's party won 169 seats compared to 153 for Mariano Rajoy's conservative Partido Popular party.
The Socialists picked up an extra six seats on the 2004 election but left the party seven short of a majority in the 350-seat parliament.
"A Second Opportunity," read the editorial headline in Monday's El Pais, which added that the Socialists "will have to continue counting on external support."
The Basque Nationalist Party, which won six seats, offered its support. "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," party president Inigo Urkullu said.
Moments after his challenger conceded, Zapatero thanked supporters.
"The Spanish have spoken with clarity, and they have decided to open a new chapter," Zapatero said."I will govern with a firm hand and with the hand extended."
Zapatero has ruled with a plurality since 2004, when he and Rajoy first faced each other in a general election, and the prime minister faced concerns about a faltering economy going into Sunday's vote.
"The economic problems have hurt everyone. The prices have risen sharply for all of the daily needs," said Manuel Lustres, a security guard who voted for the Partido Popular.
The vote was also shadowed by the death on Friday of a former Socialist town councilman, Isaias Carrasco, who was killed in an attack in northern Spain blamed on Basque separatist group ETA.
"Isaias should be here today, living this moment and alive with his family," Zapatero said Sunday night.
The 2004 election, held in the wake of the Madrid train bombings that killed 191 people, gave Zapatero's Socialists an upset victory. Zapatero's first decision upon taking office in 2004 was to pull Spain's troops out of Iraq.
Güncelleme Tarihi: 10 Mart 2008, 18:09