They were hoping they could form a government, but the numbers in parliament did not add up.
The head of the Socialists in Spain, Pedro Sanchez, has failed in a first vote to become prime minister and form a minority coalition.
Only 130 of the 350 parliamentarians voted yes to the plan, which was drafted in response to inconclusive elections in December.
Mariano Rajoy, head of the Popular Party, told deputies: “I take the floor to announce on behalf of the Popular Party, our vote against the candidacy of Mr. Sanchez.
“You haven’t moved a finger to form the government and you probably think today someone will give it to you as a gift.”
Pedro Sanchez responded: “Mr. Rajoy, you should have been standing here today, if you had the courage, political courage. You should have been here at this podium talking and not sitting there listening.”
The conservative Popular Party has already attempted without success to form a government.
Pablo Iglesias from the Podemos party said: “Today, once again I extend my hand to you Mr. Sanchez, to ask you that following this failure, negotiate with us.
“For brotherhood and the interest of the Spanish people negotiate with us for a programme and a government of real change.”
A second vote is due on Friday, but experts say unless the parties change their position, Sanchez is still unlikely to win and new elections could be on the cards.