COPENHAGEN, Oct. 1— In what gay rights advocates hailed as the first unions of their kind in the world, six homosexual couples were legally joined today in ''registered partnerships'' that gave them most rights of married heterosexuals, but not the right to adopt or obtain joint custody of a child.

Each of the couples entered a small room in the ornate City Hall, and in civil rites that differed from those of heterosexuals only in the description of the union were asked by Mayor Tom Ahlberg if they wanted to be ''in partnership'' with each other. After saying ''I do,'' the couples, all of them male, were given certificates of their partnership.

The ceremonies, followed by the traditional throwing of rice and confetti, were held on the day a new national law went into effect making Denmark the first country to legalize homosexual unions.

Members of Parliament passed the measure in May by a vote of 71 to 47, after a 40-year campaign by gay rights advocates. In this country where Government has traditionally been sympathetic toward minorities, opposition has come mainly from the small Christian People's Party, which called the legislation unnatural, unethical and dramatically at odds with the laws of other countries. Unions Not Called Marriages

Although the law stops short of calling the unions marriages, it gives homosexual couples most of the advantages and disadvantages of marriage. Partners - at least one must be a resident Danish citizen - are liable for each other's maintenance. They also have the automatic right to inherit the other's property, and must undertake legal divorce proceedings to dissolve the partnership. They can also be forced to pay alimony, and in some circumstances, a partner can be held responsible for the other's tax liabilities.

But the couples cannot be married in the state Danish People's Church, which is Evangelical Lutheran and to which more than 90 percent of the population of 5 million belong. The church does not recognize such unions.

Lesbians in particular object to the law's failure to grant the right to adopt or obtain joint custody of a child. Some gay-rights advocates saw this as the main reason that no women took part in today's ceremonies.

Advocates said that Sweden last year became the first country to provide some minimum rights to homosexual couples, including rights involving inheritance, but that the Swedish law equates homosexual couples with unmarried heterosexual couples.

In the United States, San Francisco will have a measure on the November ballot that would give legal recognition to the ''domestic partnership.'' The measure would allow couples in nontraditional relationships to register their partnerships with the city, in much the same way that couples apply for marriage licenses.

New York's highest court expanded the legal definition of a family in July, ruling that a gay couple who had lived together for a decade could be considered a family under New York City rent-control regulations.

At the ceremony here today, Eigil and Axel Axgil, who have lived together since 1950 and taken syllables from their first names to form a common surname, were among those legally united. Axel Axgil founded the first national association for homosexuals in 1948, after which he was dismissed from his job and became the target of other discrimination.

''The only way to be able to move anything is to be open about it,'' said Eigil Axgil, 67 years old. ''You have to say that this is the way I am so society can be open to you. If everyone follows this lead in Denmark, if everyone goes out and says this is the way they are and go out of the closet, this event will also happen in the rest of the world.''

The Christian People's Party, which has four of the 179 seats in Parliament, unsuccessfully tried to force a referendum on the issue but hopes to make the law an issue in the next election, which must be held by 1992.

Flemming Kofod-Svendsen, the party's chairman, said in an interview that his party opposed the law for several reasons, including its impracticality. The law is not recognized in any other country, he said.

Also, Mr. Kofod-Svendsen said, the Bible makes it clear that marriage can only be between man and woman.

''We also oppose the law for family reasons,'' the legislator said. ''The foundation for family life and society is marriage which, it is my understanding, is between a man and a woman.''

Members of the Rev. Ivan Larsen's 11,000-member Evangelical-Lutheran parish in Copenhagen apparently disagree. The cleric said that when he told parishioners he would be joining in a homosexual partnership today with Ove Carlsen, a school psychologist, they wished the couple ''good luck.''

Bishops in the state church are apparently at odds over the law. Local newspapers reported that some favored being able to bless homosexual couples united in partnership. But other bishops were quoted as saying that because the law stated that homosexual couples were entering into a partnership and not a marriage, the debate was irrelevant because the church could bless only marriages.

But Else Slange, chairman of the Danish National Organization for Gays and Lesbians, said the fact that Denmark became the first country to adopt such a law had ''something to do with our religious traditions.''

''I think the Lutheran Church has more and more opened itself up to different kinds of things,'' she said. ''I think that does something to the community, that thoughts get more free.''

photo of Axel and Eigil Axgil (AP)