Nicaragua has approved a sweeping new law banning abortions - even in cases where the mother's life is at risk.
Some women's groups have hit out against the changes
The national assembly approved the bill by 52 votes to none, and the bill is now likely to be signed into law.
Abortion has become a central issue in the campaign for Nicaragua's presidential elections on 5 November.
Left-wing Sandinistas in parliament supported the bill for fear of alienating Roman Catholic voters before the election, correspondents said.
The former Sandinista leader Daniel Ortega was a defender of Nicaragua's limited abortion rights and a critic of the Catholic church when he led a left-wing Nicaraguan government in the 1980s.
He has since been reconciled with the church and has become a strident opponent of abortion.
He is currently the lead candidate in the presidential election campaign, but is unlikely to gain enough votes to avoid a run-off vote after the first poll.
Nicaragua already has strong anti-abortion laws, with women and doctors who take part in abortions facing prison sentences of up to six years.
A section of the bill increasing those sentences to up to 30 years was not approved by the parliamentarians, and so will not be signed into law by the country's President, Enrique Bolanos.
One pregnant demonstrator spread her message on her stomach
The timing of the vote was opposed by Nicaragua's medical association and UN representatives, who warned that the debate had become politicised ahead of the election.
Reuters news agency reports that hundreds of people protested outside the National Assembly in the capital Managua on Wednesday night, saying the law would be a death sentence for the some 400 women who suffer ectopic pregnancies in Nicaragua each year.
"They are forcing women and girls to die. They are not pro-life, they are pro-death," protester Xiomara Luna told the agency.
BBC Americas editor Will Grant said that public opinion in Nicaragua, which is estimated to be 85% Catholic, appeared to be behind the bill.
Before the vote, Orlando Tardencilla, one of the members of the sub-committee which proposed the bill, said: "Unless abortion is made a crime, then people can simply come out and say: 'I have the right to an abortion, this is my body and I can decide.'
"That's like saying: 'I'm allowed to commit murder because these hands are mine, this gun is mine.'"
But the Women's Autonomous Movement, a rights group, told the Associated Press it was prepared to file an injunction to stop the law.