The law also sets out naming rules for adoptees and people born outside marriage. A child registered by a single parent would take that parent's name as a first surname. And one whose parents are unknown altogether would be given "two commonly used names" selected by the civil registry office.
In the United States and many other countries, couples are free to decide what surnames to give their children. Even in many Latin American nations, some people already shun convention and use a mother's name if family circumstances make use of the paternal name inconvenient or impossible.
Uruguay's neighbor Argentina has been more rigid: When it became the first Latin American country to legalize gay marriage in 2010, its lawmakers said last names would go in alphabetical order for the children of same-sex couples, and they left the naming traditions of heterosexuals unchanged.
While Uruguayans seem broadly in favor of legalizing gay marriage, the naming issue has led to some confusion.
"I really can't understand the point of letting heterosexual couples choose the order of their surnames. In reality, I think it's for political correctness, and the price is to lose information: Today when someone is presented, we know clearly who the father is and who the mother is. Not so in the future," said office worker Daniel Alvarez.
Gloodtdofsky acknowledged that non-gays may not have realized yet why these changes are necessary, "but the reality is that gays have been living as couples for years, generating rights. These rights must be recognized and attention must be paid to this new version of marriage."
Uruguay has had a civil unions law that covers gay couples, and Bishop Jaime Fuentes of the Roman Catholic Church's Episcopal Conference of Uruguay said "It seems logical that two people of the same sex who care for each other and want to share their lives can have some kind of civil recognition, but it can't be the same as what governs marriage."
But Federico Grana of the Black Sheep Collective, a gay rights group that presented a first draft of the bill, said "society is much broader than just heterosexuals, so the law should reflect this, with everyone included, and no discrimination."
Associated Press Writer Michael Warren in Buenos Aires contributed to this report.