The Uruguayan Senate has passed legislation to decriminalise abortion in the first 12 weeks of pregnancy.
A similar move in 2008 was vetoed by President Tabare Vasquez, but current President Jose Mujica has signalled he will sign the bill into law.
The legislation now goes to the lower house, which, like the Senate, is controlled by Mr Mujica’s allies.
Opinion polls suggest a majority of Uruguayans back easing the restrictions on abortion.
Under the current legislation, women who have an abortion and the people who assist them face prison.
Abortion is only allowed in the case of rape or when the life of the woman is in danger.
Senators debated for some 10 hours on Tuesday before voting 17 to 14 to pass the bill.
“We don’t have the right to pass moral judgement by saying that the woman who continues her pregnancy and has her baby is in the right whereas the one who doesn’t, for whatever reason, is in the wrong,” said Sen Monica Xavier, from the governing leftist Broad Front coalition.
“How can the law leave the decision to end a pregnancy only with the woman?” said Sen Alfredo Solari from the opposition Colorado Party.
“Instead of promoting responsible fatherhood, with this law we’re saying the man doesn’t matter.”
The bill now goes to the Chamber of Deputies where it is expected to be debated in March.
In 2008, the lower house and the Senate approved decriminalisation of abortion, but the bill was vetoed by President Vasquez.
Most Latin American countries allow abortion only in cases of rape, when the woman’s life is in danger or if the foetus is severely deformed.
But both Cuba and Mexico City, though not the rest of Mexico, allow abortions without restriction in the first 12 weeks. (BBC News)