Poland's parliament has voted overwhelmingly to reject a controversial citizens' bill for a near-total ban on abortion.
The government said that protests against the bill had given ministers "food for thought".
Poland already has among the tightest abortion laws in Europe, and the proposal sought to ban all abortions unless the mother's life was at risk.
MPs voted to reject the bill by 352 votes to 58.
The bill came from an anti-abortion citizens' initiative that gathered some 450,000 signatures. It was initially backed by the Catholic Church, but bishops then said they could not support one of the proposals, to jail women who had an abortion.
The proposals were not sponsored by Poland's ruling, socially conservative Law and Justice party (PiS) and MPs were given a free vote. However, many PiS MPs initially voted to back the bill when it went before parliament last month.
Some 100,000 people, mostly women, protested against the proposals in cities across Poland on Monday and appeared to prompt the PiS to swing against the bill, although the party promotes Catholic values.
Prime Minister Beata Szydlo distanced herself from a change to the law and Deputy Prime Minister Jaroslaw Gowin moved to reassure women on Wednesday that a total ban would not get through.
"Abortion will certainly not be banned when the woman is the victim of rape or if her life or her health is in danger," he insisted.
What would have changed?
Abortion is already largely banned in Poland. The only exceptions are a severe and irreversible damage to the foetus, a serious threat to the mother's health, or if the pregnancy is the result of rape or incest.
The Stop Abortion campaign group wanted the ban extended to cases of rape and incest. The only exception would have been where the mother's life was in danger.
Doctors already risk punishment if they carry out an illegal termination. But the tighter proposals would have made abortion punishable with an five-year prison term.
A lesson in humility, by Adam Easton, BBC News, Warsaw
In the end this was a bill that not even the Catholic Church could support.
Just before the vote in parliament, Poland's bishops put out a statement saying that while they opposed abortion they did not support punishing women for having the procedure.
The proposed ban was not popular amongst most Poles, even though some members of the right-wing ruling party initially supported it.
The scale of Monday's protests clearly gave Law and Justice food for thought, and the education and science minister Jaroslaw Gowin spoke about a lesson in humility.
After the vote, Prime Minister Beata Szydlo said a pro-life education campaign would be prepared instead.
It seems that a 23 year-old compromise, which only allows abortion in cases of rape or incest or when the health of the mother or foetus is seriously endangered, will remain in place.