The Finnish parliament legalized same-sex marriage Friday in a narrow 105-to-92 victory for the citizen-led initiative. The victory makes Finland the last of the Nordic states to pass the law and the 12th country in Europe.

“Finland should strive to become a society where discrimination does not exist, human rights are respected and two adults can marry regardless of their sexual orientation,” Alexander Stubb, the center-right prime minister, said in an open letter before the vote.

The legislation follows laws in 2002 that permitted citizens to enter into registered partnerships. It expands those laws to now allow those in same-sex marriages to enjoy exactly the same rights as heterosexual couples, including adopting children and sharing a surname.

The bill was rejected by the country's legal affairs committee before the vote, which feared that the law would make it harder for Finns to adopt children from abroad, particularly from neighboring Russia, where same-sex marriage is illegal. The vote also faced stern criticism from the nationalist Finns Party, which said that every child in Finland has the right to a mother and a father. “This is a question of the future of our children and the whole society, and such changes should not be made without thorough evaluation of their impact,” Mika Niikko of the nationalist Finns Party said before the vote.

The vote was initially brought to parliament after a public petition gathered 160,000 signatures forced a debate on the issue.