But the trend is not universal. Honduras barred gay couples from marrying or adopting children in 2005, and refused to recognize same-sex marriages from other countries. The anti-gay atmosphere in Honduras is so intense, human rights groups say, that more than 20 gay and transgender people have been killed there in the past five years.

“This inspires us to fight even more,” Óscar Amador, a spokesman for Violet Collective, a gay rights group in Honduras, said of Argentina’s law. “Maybe one day, we’ll have the same.”

In Guatemala, President Álvaro Colom said of gay marriage during his 2007 campaign that “God said ‘Adan and Eva,’ not ‘Adan and Esteban.’ ”

Once elected, though, Mr. Colom agreed to support civil unions and invited gay leaders to the National Palace. “Esteban,” the president said, according to news reports, “I ask you in the name of the Guatemalan state and in my own name to pardon us for centuries of mistreatment and discrimination.”

Argentina had a history of granting labor rights in the 20th century, and Mrs. Kirchner and her husband, former President Néstor Kirchner, have sought to satisfy the demand for human rights that has followed the country’s return to democracy in 1983. Under the Kirchners, the government has marginalized the military and now the Catholic Church, both of which once held greater political sway here.

The government “committed treason against public opinion by not holding a plebiscite on the issue,” said Eduardo Bieule, president of the Corporation of Catholic Lawyers in Buenos Aires, noting that tens of thousands of people demonstrated against the law. “I don’t want to think about the legal problems this is going to bring.”

Some political observers saw the Kirchners’ strident support of same-sex marriage as opportunistic. Mr. Kirchner, now a congressman, hopes to run for president again next year, and the issue gives him a chance to appear more liberal, especially in Buenos Aires, a city where he has lost support and that has become a destination for gay tourism.