Buenos Aires, Argentina (CNN)The Argentine Chamber of Deputies voted Thursday morning to legalize elective abortion in the first 14 weeks of pregnancy.
The bill now goes to the more conservative Senate for consideration. President Mauricio Macri has said he won't veto the bill if Congress approves it, even though he opposes abortion.
"We have been able to settle our differences with respect, tolerance and listening to each other; understanding that dialogue is the road that will strengthen our future," Macri said. "My congratulations to everyone, knowing that this debate now continues in the Senate."
Though it's unclear whether the bill will become law, the issue has energized Argentine women, including thousands who filled the streets around Congress during 23 hours of tense debate.
"Legal abortion in the hospital!" they chanted upon hearing the bill was approved.
In Argentina -- a Catholic country and the homeland of Pope Francis -- abortion is illegal except in cases of rape or when the woman's life is endangered. Supporters of abortion reform say even those legal abortions are difficult to obtain. Women who otherwise get abortions can be imprisoned for as long as four years.
The Chamber of Deputies' bill also would allow women to get legal abortions after 14 weeks if the pregnancy resulted from rape, the woman's health was at risk, or the fetus suffered severe conditions not compatible with life outside of the womb.
The vote was 129 to 125. It first was reported to have passed with 131 votes, but two congressmen claimed they pushed the wrong button and voted for the bill when they meant to vote against it.