
Argentina's senate has voted against a bill to legalise abortion in the first 14 weeks of pregnancy.
After a more than 15-hour debate, senators voted 31 in favour to 38 against.
The bill had already been passed by the lower house of Congress and the country's president, Mauricio Macri, had said he would sign it.
Existing rules that only allow the procedure in cases of rape or risks to a woman's health will remain in place following the vote.
The issue has divided the majority-Catholic country – the homeland of Pope Francis – and crowds of anti-abortion demonstrators were pictured celebrating outside Congress before dawn on Thursday after the result was announced.
During the debate, Senator Mario Fiad called abortion a "tragedy" and said the legislation would violate international treaties.
"The right to life is about to become the weakest of rights," he said.
Opposition Senator Pedro Guastavino said he was initially against the proposal but changed his mind after coming to understand that illegal abortions put lives at risk.
"The only way to understand this is through the point of view of public health," he said.
Jose Miguel Vivanco, director for the Americas at Human Rights Watch, said Argentina had a "historic opportunity" to protect the rights of women. Amnesty International told Argentine legislators that "the world is watching".
Activists pushing for a change in the law said as many as 3,000 women had died of illegal abortions since 1983.
While many doctors supported a change in the law, hundreds of medics staged anti-abortion protests, in one case laying their white medical coats on the ground outside the presidential palace.
The Argentine vote has renewed a debate about the provision of terminations for pregnant women across Latin America, which continues to have strict laws on abortion backed by its largely Catholic populations.

In neighbouring Brazil – home to the world's largest population of Catholics – abortion carries a punishment of up to three years in prison unless a woman is raped, pregnancy puts her life in danger, or a foetus is brain-dead.
Chile's Constitutional Court last year upheld legislation ending its absolute ban on abortions, permitting the procedure when a woman's life is in danger, when a foetus is not viable or in cases of rape.
Small groups rallied in other countries across the region to voice support for the Argentine abortion measure, including in Mexico, Brazil, Uruguay, Ecuador, Paraguay and Peru.
Additional reporting by agencies