Chile was poised to lift its total ban on abortion, after the Chamber of Deputies weighed a measure to decriminalise the procedure in certain cases - the last step before it would go to President Michelle Bachelet for her signature.

The lower chamber's vote, expected on Thursday, will come after the senate passed the measure in the early hours of Wednesday.

Until now, the South American country has been part of a small group of socially conservative nations that barred abortion under all circumstances - including the Dominican Republic, El Salvador, Gabon, Haiti, Malta, Nicaragua, the Philippines and Senegal.

The Stream: Chile battles over abortion for 11-year-old

But if passed, the legislation would allow abortion in cases of rape, if the mother's life is at risk or if the foetus presents a deadly birth defect.

Approval in the Chamber of Deputies would send the law to Bachelet - a paediatrician who returned to office in March 2014 after serving as Chile's first woman president from 2006 to 2010.

After hours of tense debate and more than two years in the making, senators approved the proposal, capping a marathon session of nearly 17 hours.

"It's a historic morning," said Bachelet, who during her previous term pushed for the "morning-after pill" and now again challenged conservative groups with the abortion law.

"Beyond the fact that everyone can have a personal opinion, this project shows that we are a country where women, faced with such situations, can make the best decision possible."

During the debate in Chile's senate, police were called in to remove religious activists, most of them youths, from the chamber because they kept interrupting debate with anti-abortion rights chants and protest signs.

"Human beings have dignity just by existing," one sign read.

Another woman held up a poster reading "Turn to Christ" and cried out "Return to the Lord!" as she was led out.

Against abortion bill

Chilean conservatives have rallied against the abortion bill ever since Bachelet introduced it in January 2015.

Nevertheless, polls show that 70 percent of Chileans support legalised abortion under the three conditions introduced in the senate.

Chile had permitted abortion for more than 50 years - only if the mother's life was in danger or if the fetus was not viable - until it was strictly outlawed in 1989 during the final days of the Augusto Pinochet dictatorship.

Under current law, abortion is punishable by up to five years in prison.

However, about 30,000 provoked or spontaneous abortions are recorded each year in the country, though it is estimated that clandestine abortions could number around 160,000, according to a pro-abortion rights group.

"It's an act of cruelty to not allow women to decide," Senator Guido Girardi said during the debate.

Conservative Senator Ena Von Baer warned that she would send the measure to the country's Constitutional Tribunal for review, claiming that it denies protection to unborn children.

Politicians from Bachelet's Socialist party have tried in the past to introduce abortion bills, but they have always been voted down by the legislature.

Bachelet, who was a senior UN official working on female empowerment issues after her first term in office, has seen her support wane due to administration scandals.