The Spanish government has abandoned a bill that would have outlawed nearly all abortion procedures in Spain, one that a wide majority of the country opposed. Spanish Prime Minister Mariano Rajoy announced the news at a press conference on Tuesday.

Abortion has been legal in Spain since 1985. As of 2010, under José Luis Rodriguez Zapatero’s socialist government, the law allowed termination of pregnancies up to 14 weeks along, or up to 22 weeks along in cases of fetal abnormalities or danger to the mother’s life.

The conservative People’s Party government approved a draft bill in December that would have allowed abortion only if the pregnancy had resulted from a rape that was reported to the police, or if two physicians swore that the fetus would put the mother’s life at risk.

The law also would have required women to meet with government social workers and undergo a one-week “reflecting” period to consider alternatives to abortion, according to Newsweek. It also would have eliminated a woman’s right to terminate a pregnancy based on fetal abnormality.

The party, which later won a majority in the government in 2011, had promised during campaigning to toughen Spain’s abortion laws, NPR reported.

Critics of the law said it would have put Spanish women at risk by driving them to perform the procedure without a doctor. France’s Social Affairs Minister Marisol Touraine said it would “take women back to the Stone Age,” according to Global Post.

If the law had passed, it would have been one of the toughest abortion restrictions in Europe. Malta is the only European country that currently has a ban on abortion. Polls showed that a large majority of Spaniards opposed the bill–80 percent of the population, included 50 percent of those who identified as Roman Catholic, said they were against the law.

Rajoy said that he made the right decision in abandoning the law.

“As president of the government I have taken the most sensible decision,” Rajoy said at the press conference. “We can’t have a law that will be changed when another government comes in.”

Alberto Ruiz Gallardón, the Spanish Justice Minister who had strongly supported the law, resigned after Rajoy announced the decision.