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.
Since Law and Justice came to power last year, it has been criticised by the EU for taking control of state media appointments and for reforms to Poland's constitutional court.
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.