Mexico City lawmakers voted to legalize abortion Tuesday, a decision likely to influence policies and health practices across Mexico and other parts of heavily Roman Catholic Latin America.

The proposal, approved 46-19, with one abstention, will take effect when the leftist mayor signs it. Abortion opponents have already vowed to appeal the law to the Supreme Court, a move likely to extend the bitter and emotional debate in this predominantly Catholic nation.

"Decriminalizing abortion is a historic triumph, a triumph of the left," said city legislator Jorge Diaz Cuervo, a social democrat who voted for the bill. "Today, there is a new atmosphere in this city. It is the atmosphere of freedom."

Nationally, Mexico allows abortion only in cases of rape, severe birth defects or if the woman's life is at risk. Doctors sometimes refuse to perform the procedure even under those circumstances.

The new law will require city hospitals to provide the procedure in the first trimester and opens the way for private abortion clinics. Girls under 18 would have to get their parents' consent.

The procedure will be almost free for poor or insured city residents, but is unlikely to attract patients from the United States, where later-term abortion is legal in many states. Under the Mexico City law, abortion after 12 weeks would be punished by three to six months in jail.

Mexico City is dominated by the leftist Democratic Revolution Party, at odds with President Felipe Calderon's conservative National Action Party, which opposed the abortion measure.

"We go to great lengths to protect (sea) turtle eggs," said city lawmaker Paula Soto, a member of Calderon's party. "Lucky turtles! It appears they have more people willing to defend them than some unborn children."

The law alarmed Calderon's party and prompted authorities to send ranks of riot police to separate chanting throngs of opposing demonstrators outside the city legislature.

"We want this law, because it means the right to choose," said Alma Romo, who described herself as a feminist. "Unfortunately, there are some people who do not want to grant us that right."

The only other countries in Latin America and the Caribbean with legalized abortion for all women are Cuba and Guyana. Most others allow it only in cases of rape or when the woman's life is at risk. Nicaragua, El Salvador and Chile ban it completely.

The New York-based Center for Reproductive Rights, the legal arm of the reproductive rights movement globally, applauded the Mexico City law as "historic."

"This will serve as a model to get abortion accepted not only nationwide, but also in Latin America and the Caribbean, where women who interrupt their pregnancies are still sent to jail," said activist Elba Garcia, 24, who rode a flatbed truck in an abortion rights caravan through downtown Mexico City on Monday.

Recent newspaper polls showed that a majority of Mexico City residents support legalized abortions, at least in the first weeks of pregnancy.

The proposal has created an emotional confrontation in a country where the majority of people are Roman Catholic.

Calderon has opposed the proposal, and church leaders have led protests that pushed the limits of Mexico's constitutional ban on political activity by religious groups.

Opponents argue that life begins at conception and say the law would violate the Mexican Constitution's protection of individual rights. Supporters say the law would save the lives of thousands of women.

The city and its suburbs are home to about one-fifth of the country's population, and many Mexicans travel to the capital for medical treatment. Opponents fear the local law could attract women across Mexico seeking abortions.

An estimated 200,000 women have illegal abortions each year in Mexico, based on the number who show up at hospitals later seeking treatment for complications, said Martha Micher, director of the Mexico City government's Women's Institute.

Botched abortions using herbal remedies, black-market medications and quasi-medical procedures kill about 1,500 women each year and are the third-leading cause of death for pregnant women in the capital, Micher said.