A pro-Palestine protester in Spain climbs a statue of Carlos II in Madrid in July. (Getty)
A pro-Palestine protester in Spain climbs a statue of Carlos II in Madrid in July. (Getty)

The Israeli government has attacked a symbolic decision by Spanish lawmakers to formally recognise the Palestinian state, accusing it of encouraging Palestinians to take "extreme positions".

Spain's lower house of parliament voted in favour of a motion on Tuesday urging the Spanish government to "recognise Palestine as a state".

The vote came on the same day as the attack on the Haf Nor synagogue in eastern Jerusalem by two Palestinians, in which five people were killed, and the Israeli government said that the Spanish parliament should have instead focused on condemning the attack.

"The Spanish parliament's declaration only pushes away further the chances of reaching an agreement between Israel and the Palestinians, because it encourages the Palestinians to take extreme positions," a statement from the Foreign Ministry said.

"It would have been better had the Spanish parliament seen fit to denounce the abominable massacre in a Jerusalem synagogue carried out by Palestinians who were incited."

The motion specifies that formal recognition of the Palestinian state must be the outcome of negotiations between Israel and Palestine, not through unilateral recognition by foreign states, in distinction to similar recent votes by the UK and Irish parliaments.

Late on Wednesday, Israel's prime minister Benjamin Netanyahu accused members of the international community of ignoring bloodshed by Palestinians and instead seeking to reward a Palestinian state that does not recognise Israel.

"Unfortunately, there are some who are trying even now to give the Palestinians a prize... of a Palestinian state which doesn't even recognise the Jewish state," he said.

"We won't put up with this."

Speaking on Israeli radio, Spanish ambassador to Israel Fernando Carderera Soler said that although the vote came at a "very bad moment", the motion was in fact "very positive" for all parties.

"It doesn't worsen the situation, and this is not what the Spanish parliamentarians want to do, the Spanish parliamentarians want to provide an incentive for negotiations," he said.

In the West Bank, Palestinian officials welcomed Spain's vote.

"There is a momentum now to engage positively to recognise a state of Palestine and to invest in just peace otherwise Israel will pursue its policies of destroying the two state solution, destroying the chances of having a viable Palestinian state," Palestinian Authority official Hanan Ashrawi told Euro News.

The news comes after Israel announced plans to build 78 more settlements in east Jerusalem, which the Palestinians argue Israel is occupying illegally.

Similar settlements have drawn criticism from the United States and EU.

In October, Sweden became the first European country to formally recognise the Palestinian state.