Spain's cabinet on Thursday approved a bill to liberalise the abortion law, a measure that has angered the Roman Catholic Church and led to mass demonstrations by opponents.
The law will provide "more legal guarantees for women, more security for health professionals and help prevent unwanted pregnancies," said Equality Minister Bibiana Aido.
It will also "bring us closer to the rest of Europe."
Under the measure, abortions would be allowed for women of 16 years and over up to the 14th week of pregnancy and up to 22 weeks if there is a risk to the mother's health or if the foetus is deformed, Aido told a news conference.
Woman can also undergo the procedure after 22 weeks if the foetus has a serious or incurable illness.
The bill would reform a 1985 abortion law, which decriminalised abortion but only for certain cases: up to 12 weeks of pregnancy after a rape; up to 22 weeks in the case of malformation of the foetus; and at any point if the pregnancy represented a threat to the physical or mental health of the mother.
The government in December said the number of abortions carried out each year in Spain had more than doubled in the last decade, reaching 112,138 in 2007, in what it said was a clear sign that the law needed to be reformed.
Only two percent of abortions in Spain are estimated to take place in public clinics, where many doctors refuse to perform them on ethical grounds or because they fear legal action.
Most are done in private clinics and are justified on the grounds that the pregnancy posed a "psychological risk" for the health of the woman.
"With the new law, no women will go to jail for interrupting her pregnancy," although "that does not mean that illegal practices will not still be punished," said Aido.
Earlier this year a government-appointed panel of experts recommended that Spain ease its restrictions on abortion and allow the procedure on demand up to 14 weeks into a pregnancy.
But the Catholic Church, which has previously clashed with the Socialist government over the legalisation of gay marriage and a fast-track divorce law, has condemned the measure.
Tens of thousands of protesters took to the streets of Madrid in March to demand its withdrawal.
The head of a Right to Life association, Ignacio Arsuaga, condemned the draft law as "radical and extremist."
The conservative opposition Popular Party said it gives the impression that abortion "is one more method of contraception."
After the government's preliminary approval, the bill must still be examined by the judiciary before it goes back to the cabinet and is finally passed by parliament.
The government announced last week it plans to make the so-called "morning-after" contraception pill available without prescription to reduce the number of unwanted pregnancies.