Swiss lawmakers on Friday approved a bill that allows gay and lesbian couples to marry.

The legislation was first introduced in 2013.

The “Marriage for All” bill received broad bipartisan support, even among the conservative Swiss People's Party. The legislation's main sticking point was giving lesbian couples access to sperm donations. The bill's final wording includes this provision.

Switzerland has recognized gay couples with registered partnerships since 2005. But marriage includes additional rights, such as the joint adoption of children.

Opponents of the legislation have vowed to put it up to a public vote. They have 100 days to gather 50,000 signatures to get it on the ballot.

Survey data shows the legislation is likely to survive this challenge.

According to a survey commissioned earlier this year by Pink Cross, an LGBT rights group, a large majority of Swiss (80%) support same-sex marriage. Support is high even among conservatives. Pollsters found 67 percent of respondents who said that they are members of the Swiss People's Party in support of equal marriage rights.