Uruguay Wednesday became only the second country in mostly Catholic South America to legalize abortion.

The Senate voted to allow women the right, under certain conditions, to end an unwanted pregnancy, and make access to the right part of its health care system.

The tally in the 31-seat chamber was 17 in favor to 14 against. The lower house in Congress had given the green light back in September.

With more cows than people, this sleepy, well-educated nation of just three million sandwiched between Argentina and Brazil might seem an unlikely trailblazer on the public health front.

The developments however come under the government of a president who is a doctor by training, Jose Mujica, and a deputy health minister, Leonel Briozzo, who is an obstetrician.

Prior to Wednesday's vote, aborted pregnancies did happen unofficially here.

A non-surgical technique made use of the drug misoprostol, a common ulcer medication, to facilitate expulsion of the fetus.

The drug has up until now only been sold on the black market for abortion use, but now it will presumably soon be available for legal procedures in public health facilities.

"Safe abortion practices are Uruguay's top health contribution to the region," Briozzo, a strong advocate of a woman's right to safe legal abortion, told AFP on the eve of the vote.

Briozzo said the drug-induced abortions ought to be the medical standard for the procedure worldwide, including in Europe, where surgical abortion is common.

Surgery is "less appropriate, and more unsafe," Briozzo argued.

Uruguay is now only the second South American country to legalize abortion, after English-speaking Guyana in 1995. Cuba, a Latin American nation in the Caribbean, did so in 1965 and procedures are also legal in Mexico City.

"The explanation is that Latin America is the last outpost of the Roman Catholic Church," Briozzo said.

The bill, inspired by similar legislation in some European countries, allows a first trimester abortion only after a woman has consulted a team of three medical professionals on the potential risks of terminating a pregnancy.

Doctors will also be required to advise women about alternatives to ending the pregnancy, including adoption and social welfare programs that could help her to care for a newborn infant.

Until now abortion here was punishable by nine months in prison for the woman and up to two years for the doctor performing the abortion.

The changes are to some degree disliked by both sides.

Some pro-choice activists are disappointed that the new legislation fails to acknowledge a woman's right to determine her own reproductive fate. Pro-life campaigners, meanwhile, say it legalizes the killing of an unborn person.

Mujica, 77, who belongs to the leftist Frente Amplio coalition, has vowed to sign the abortion bill into law once it is approved by the Senate.

There are no statistics on illegal abortions in Uruguay, but non-governmental groups estimate their number to be around 30,000 per year, although charges are actually brought in very small number of cases.