The authorities in Brazil have ruled that marriage licences should not be denied to same-sex couples.
The council that oversees the country's judiciary said it was wrong for some offices just to issue civil union documents when the couple wanted full marriage certificates.
Correspondents say the decision in effect authorises gay marriage.
However full legalisation depends on approval of a bill being examined by the Congress.
Tuesday's resolution by Brazil's National Council of Justice was based on a 2011 Supreme Court ruling that recognised same-sex civil unions.
However, notary publics were not legally bound to converting such unions into marriages when asked by gay couples.
This led to some being denied marriage certificates at certain places, but being granted the document at others. That would be illegal, according to the new resolution.
"If a notary public officer rejects a gay marriage, he could eventually face disciplinary sanctions", NCJ judge Guilherme Calmon told BBC Brasil.
The ruling brings Brazil one step closer to its neighbours Argentina and Uruguay, which have legalised gay marriages.
But opponents could still challenge it at the Supreme Court.
And the same-sex marriage bill being examined by the Congress faces strong opposition from religious and conservative lawmakers.
Brazil is the world's most populous Roman Catholic nation and has an estimated 60,000 gay couples.