ZURICH — Voters in Switzerland overwhelmingly decided on Sunday to legalize same-sex marriage, making the country one of the last in Western Europe to do so.
In addition to opening up the option of marriage to all couples, an amendment to Switzerland’s marriage law that was put to voters in a referendum, and approved, grants lesbian couples access to sperm banks and allows same-sex couples to adopt children.
The marriage laws were amended by the federal government and approved last year by Parliament to grant all couples the same rights. But opponents seeking to limit marriages to unions between a man and a women collected enough signatures to force a referendum.
Polls by local news media had predicted widespread approval for same-sex marriage in Switzerland, but they also showed the opposition gaining some last-minute momentum after an intense advertising campaign. The legislation change was accepted by 64.1 percent of voters and received strong support in both urban and rural areas.
The result has been hailed as a milestone for the L.G.B.T.Q. community in the alpine nation, which has long lagged other Western European countries in terms of gender issues.
Since 2007, same-sex couples in Switzerland have been able to enter into a civil partnership, which grants some legal rights but is not equal to a marriage. The only country in Western Europe now that does not allow marriage between same-sex couples is Italy; it does, however, allow civil unions.
Kathrin Bertschy, a Swiss politician who had strongly campaigned in favor of same-sex marriage, described the result as “a milestone” for Switzerland. She said the outcome meant that the existing marriage law could be applied to everyone.
But the process has highlighted just how deep conservative views on gender issues remain in Switzerland, which did not grant women the right to vote until 1971 and until 1985 required wives to get permission from their husbands to work outside the home.
Under the new, amended law, same-sex couples will now be able to have a civil wedding and will be granted largely the same institutional and legal rights as heterosexual couples. This includes simplified naturalization for foreign partners, as well as access to fertility treatments and the ability to adopt children.
Until now, couples in same-sex partnerships could not use Swiss sperm banks. They had also been prohibited from adopting children, even though unmarried people were allowed to do so.
“It is clearly discrimination based on sexual orientation,” said Maria von Känel, who is a president of the committee leading the “yes” campaign and is herself in a same-sex partnership with two children.
“Everyone should be treated equally,” she said.
Swiss L.G.B.T.Q. organizations estimate that up to 30,000 children are currently being raised by same-sex parents in Switzerland, but the legal barriers in the country meant that many of those couples had to go abroad to start their families.
Using images of crying babies on posters plastered in towns and cities across Switzerland, the opponents had focused their campaign on their opposition to the right of same-sex couples to have children.
Daniel Frischknecht, one of the leaders of the opposition to the proposed legal change, said that supporters of the “no” campaign opposed the change to the marriage laws because they felt it undermined traditional families. “We are convinced that for children to grow up in the best possible way, they need a father and a mother,” he said.
For opponents, the vote was about more than just same-sex marriage and Mr. Frischknecht likened its significance for Swiss society to the bursting of a dam. “It will go on and on,” he said, referring to the legalizing of additional options for couples to have children, such as through surrogacy or using donor eggs. “We will save what there is to save,” he said.
Despite the changes to the marriage law, Ms. von Känel said there were still a few important points that it did not take into account, such as if both parents would be entitled to parental leave, including in situations where couples undergo reproductive assistance or fertility treatment abroad.
She noted that there was also a lot of work to be done to increase the rights and social acceptance of L.G.B.T.Q. people in Switzerland. This includes creating safe learning environments for L.G.B.T.Q. youth and banning conversion therapy, Ms. von Känel said.
Also on Sunday, 64.9 percent of voters rejected a popular initiative that would have redistributed wealth in Switzerland and would have seen income derived from investments taxed more heavily than employment income.
The initiative was opposed by the government, which said that it would take away the incentive for Swiss people to save and that it would decrease the attractiveness of Switzerland as a location for businesses.