The motion submitted by the opposition Socialists asks the conservative government to recognise Palestine in coordination with any similar move by the European Union.
It was adopted yesterday nearly unanimously in the lower house of parliament, with 319 in favour, two against and one abstention.
The vote came after yesterday's attack at a Jerusalem synagogue that saw two Palestinians armed with a gun and meat cleavers kill four people before being shot dead. The vote had been planned beforehand.
"It is not binding, it does not set a timeline for the recognition, it gives the government the margin to proceed with the recognition when it feels it will be opportune," Spanish Foreign Minister Jose Manuel Garcia-Margallo said in Brussels on Monday.
Also Read
"If we want to be effective this recognition must be done in coordination with the European Union," he added.
The motion follows moves in other European countries intended to increase pressure for a two-state solution to the Israeli-Palestinian conflict.
French lawmakers will vote on November 28 on a proposal by the ruling Socialist party urging the government to recognise Palestine as a state.
Sweden's new left-leaning government went a step further and officially recognised a Palestinian state on October 30, prompting a strong protest from Israel, which swiftly withdrew its ambassador from Stockholm.