A panel of judges in a Brazilian state has ruled in favour of authorising same-sex marriages.
Court officials expect the first marriage requests within days
The southern state of Rio Grande do Sul is the first state to do so.
The ruling gives same-sex couples broad rights in areas like inheritance, child custody, insurance benefits and pensions.
Meanwhile in the US hundreds of gay and lesbian activists gathered at New York's City Hall to support gay couples denied marriage there.
Civil unions between homosexual couples are not recognised officially in Brazil.
Proposed legislation to guarantee gay couples the same rights as heterosexuals has been debated in Congress for more than nine years.
But a statement from the judges in Rio Grande do Sul said homosexual relationships existed and as such, deserved to be regulated by law.
"Technically, this is not going to be called 'gay marriage' by the justice of the peace, but it is the equivalent," Tania Bampi, a spokeswoman for the state court administration, said.
Human rights question
The ruling binds all judges and justices-of-the-peace in the state to approve civil unions "between persons of sound mind and independent of sexual orientation".
As yet no gay couples have sought permission for a union but court officials expect requests to start within days.
The ruling was sparked by a request for an opinion on the issue by Rio Grande do Sul's Human Right Commission which was made by various gay rights groups in the state.
In New York protesters braved the rain to show their support
In the US, where the issue of same-sex marriage has proven especially divisive, gay activists gathered in the rain outside New York's City Hall on Thursday to voice their support for couples looking to marry.
Hundreds of would-be brides and grooms held signs reading "Equal rights, no more, no less," and "Marry Us".
"This is really a civil rights movement, for our children, for our children's children, we want to make sure that they have the same rights, as well as we do," Mara Gottlieb, who has lived with her female partner for 18 years told local television.
However, for now their protests fell on deaf ears - they were turned away with a letter reading "Thank you for asking but New York State does not authorize this office to grant marriage licenses to same-sex couples."
Gay marriage has become a major issue in the US that could play a large part in the forthcoming presidential election.
President George W Bush last week called for a constitutional amendment that would ban the practice.