Lawmakers in Argentina spent Wednesday afternoon and the entire night debating whether to allow women to have abortions in the first 14 weeks of pregnancy.
A vote on a draft bill is due to be held in the lower house later on Thursday.
Deputies have been split almost evenly in the highly divisive debate and the result could go either way.
If approved, the bill will still have to go to the Senate.
President Mauricio Macri is strongly opposed to the bill but has said that he would not veto it if it was passed by Congress.
Abortion is currently illegal in Argentina, except in cases of rape or when the life or health of the woman is at risk. Women seeking abortions also have to apply to a judge for permission, which critics say can unnecessarily delay the procedure.
Divided, but not along party lines
Lawmakers for and against the bill had five minutes each to outline their position and try to sway deputies from the other side.
President Macri had told members of his party to vote according to their conscience.
The debate was rare in Argentine politics in that it was not divided along party lines, but that there were opponents and supporters both on the left and the right.
Before the session started at 11:30 local time on Wednesday (14:30 GMT), more than a dozen lawmakers had said that they were still undecided.
It is these that the lawmakers speaking are trying to convince. More than 200 took to the podium in the first 19 hours of the debate.
Axel Kicillof of the Justicialist Party urged his colleagues to "give women the right to decide over their bodies".
But Mario Horacio Arce of the Radical Civic Union argued that the bill would be unconstitutional.
"The national constitution does not distinguish between different phases of pregnancy, it protects life from the moment of conception," he said.
Silvia Martínez, also of the Radical Civic Union, disagreed: "This is a great opportunity. I ask you to reflect, let's not tell women making these demands 'no'."
The divisions inside the chamber were mirrored on the streets outside, where opponents and supporters gathered for all-night vigils.
Police had earlier erected barricades to keep the two sides apart but that did not prevent the occasional shouting match.
The vote comes a year after lawmakers in neighbouring Chile approved lifting that country's total ban on abortions.
The momentum in favour of a change in the law in Argentina has grown over the past months and was further boosted by the overwhelming vote for overturning the abortion ban in Ireland.
There have been huge marches backing the bill led by #NiUnaMenos (#NotOneLess), a movement first created to fight violence against women but which has since expanded across much of Latin America to stand up for women's rights.
Tens of thousands of people have shown their support by wearing green handkerchiefs but there has also been stiff opposition led by the Catholic Church.
Non-governmental organisations say an estimated 500,000 abortions a year are carried out clandestinely, often in conditions which pose a health risk for women and girls.
In most of Latin America there are tight restrictions on abortions and in some countries such as the Dominican Republic, El Salvador and Honduras there is a total ban.
If Argentina were to pass the bill it would be the most populous nation in the region to lift restrictions on abortions.