A law, making Spain Europe's most restrictive country with regards to access to abortion, has survived the opposition Socialists bid to scrap it.

Spanish Socialists sought to hinder the unpopular bill that has driven thousands of pro-choice protesters into the street for weeks, as well as sparked rare divisions in the lines of the conservative ruling Popular Party (PP).

While the PP's majority contributed to a 183 vote against the Socialists proposal to "immediately withdraw", senior figures in the party have openly spoken against the bill, and has led to its delay.

The opposition's bill received the support of 151 politicians, while six abstained. Polls show 80 percent of Spaniards, including practising Catholics, support abortion on demand.

The former Socialist government brought Spain into line with much of Europe when it passed the current law in 2010, giving women the right to opt for abortion in the first 14 weeks of pregnancy.

The draft bill approved by the current government last month would allow abortion only in cases of rape that is reported to the police, or a medically-certified threat to the mother's physical or psychological health.

"If this goes ahead, the number of abortions in Spain will [still] rise and many of them will be more dangerous abortions for women," Elena Valenciano, deputy leader of the Socialists, told parliament in a debate before the vote.

"Inequality will grow, Spanish women will once again be divided into two groups: those that can travel to a neighbouring country and undergo a safe abortion and those that cannot."

A PP member of parliament defended the party, saying it was in favour of further debate rather than simply dismissing the issue, as the Socialists were proposing.

"We are prepared to have a dialogue," Marta Torrado de Castro said.

The bill will be subject to more discussions in parliament before being written into law.