Argentina’s Congress has legalized abortions up to the 14th week of pregnancy.
The Senators voted in favour of the bill after a marathon session with 38 in favour while 29 were against and one abstention.
The law is groundbreaking for Latin America, a region which has some of the world’s most restrictive abortion laws.
The bill had already been approved by the Chamber of Deputies and is backed by President Alberto Fernández.
The passing came two years after senators narrowly voted against legalizing abortion.
The Catholic Church, which remains highly influential in Latin America, had opposed the move, while Pope Francis, who is Argentine, had tweeted just hours before the debate that every outcast is a child of God.
Large crowds of campaigners both for and against abortion had gathered outside Congress to try to sway undecided senators.
Until now, abortions were only permitted in Argentina in cases of rape or when the mother’s health was at risk.
Activists have campaigned for the change in the law for years.