Jose Luis Rodriguez Zapatero's ruling Socialist Party has won Spain's general elections.
Supporters flocked to the Socialist party headquarters to celebrate the victory.
It was a much more subdued scene at the headquarters of the conservative Popular Party.
The Popular Party's leader Mariano Rajoy has admitted defeat.
There had been a high turnout before polling stations closed at 2000 (1900 GMT).
The election comes as a long economic boom stutters, and unemployment and inflation are on the rise.