Mexico's Supreme Court ruled Tuesday that states must recognize the marriages of gay and lesbian couples wed in Mexico City, the Los Angeles Times reported.

Lawmakers in the country's capital approved the gay marriage law in December and couples began marrying in March. About 320 gay couples have married so far. Previously, the city recognized gay couples with civil unions.

The country's federal government, which is controlled by the conservative PAN Party, had appealed to the Supreme Court. It argued the law, which for the first time permits married gay couples to adopt, was detrimental to children.

Last week, the court ruled that the city's law was constitutional.

In its 9 to 2 decision, the court said that states are not obligated to legalize gay marriage, but they must honor the marriages performed in Mexico City. The court has, in effect, legalized gay marriage recognition throughout the country.

Mexico City lawmakers approved the law over the strong objections of local PAN leaders and the Roman Catholic Church.

Mexico's Roman Catholic archbishop, Cardinal Noberto Rivera Carrera, called the law “immoral” and “reprehensible.”

The court must still rule on the constitutionality of the law's adoption provision, which might be considered as early as Thursday.

Mexico City was the first autonomous government to legalize gay marriage in Latin America, and several countries in the region have followed its lead. Argentina approved a gay marriage law last month. Chile, the last country on the continent to allow divorce, Uruguay, and Paraguay say they'll consider a gay marriage law. Peru will debate a bill that recognizes gay and lesbian couples with civil unions