Chile senators have voted in favour of a proposal to legalise abortion in certain cases. At present there is a complete ban on terminating pregnancies and a woman can be prosecuted if she has an abortion.
The proposal would allow abortions in cases of rape, if the mother's life was at risk or if there is a likelihood of the foetus not surviving pregnancy.
Senators voted separately on each of the three cases in which women could be allowed to have an abortion.
With the support of President Michelle Bachelet, the bill will now go back to the Chamber of Deputies for approval. One of the president's main goals has been to change Chile's strict abortion laws.
Supporters of the bill hope the Chamber of Deputies will approve the document without any further delay so it can be sent to President Bachelet for signing.
The proposal faced stiff opposition from the Catholic Church and socially conservative groups when it was first introduced two and a half years ago.
The vote to allow an abortion if the mother's life is at risk saw 20 in favour and 14 opposed, while the vote to allow a termination in cases where the foetus is unviable was 18 to 14. There were 18 votes to allow abortions in cases of rape with 16 against.
The voting went on until late night and was further delayed as police had to remove opponents against abortion who interrupted the proceedings with their chanting.
"I believe that women should have legally the possibility of making their own choices," Bachelet told the BBC in an interview last year.
"In this country until now this is criminalised - if you interrupt your pregnancy, you will go to jail. And I believe this is not fair," she said.