Swedish lawmakers have approved a gay marriage bill, making it the seventh country to grant gay and lesbian couples the right to marry.

The Swedish news agency TT is reporting that the measure was approved in the Swedish Parliament by a 261 to 22 vote, with 66 lawmakers abstaining or absent.

The legislation repeals a 1987 law defining marriage as a heterosexual union. A recent poll found that nearly three-fourths of Swedes (71%) approve of gay marriage. The law takes effect May 1.

Sweden has recognized civil unions for gay and lesbian couples since 1995. The union offered gay couples the same legal status as married heterosexual couples, including the right to adopt.

Gay marriage in Sweden has remained in a holding pattern for years because two of the country's four major political parties opposed it. But an October 2007 Moderate Party endorsement broke that stalemate, leaving only the Christian Democrats opposed to the legalization of gay marriage.

Gay marriage is legal in six other countries including Spain, South Africa, Norway, the Netherlands, Canada and Belgium. Two U.S. states – Connecticut and Massachusetts – currently offer gay nuptials.