The Cohabitation Act, which fueled debate and dominated domestic political news for much of the late summer and early autumn, squeaked through in Parliament on Thursday morning.

The 40-38 result (with 10 abstentions and 13 absent MPs) was the closest of the various votes on the challenge-ridden path the bill took to become law.

Signed into law by President Toomas Hendrik Ilves this afternoon, the Cohabitation Act should enter force in 2016 and allow cohabitating couples, irrespective of the gender of either partner, the right to register their relationship at a notary and enjoy the kinds of financial benefits conferred by marriage. The final version also provides for the possibility of adoption by unmarried cohabiting couples.

Ilves saw it as a basic human rights issue. In a Facebook status after signing the act, he wrote: "The fundamental document of democratic Estonia - our Constitution - requires equal treatment of all people. Estonian society will not survive intolerance of its own people. There are too few of us to disciminate against anyone."

There is some fine print, however: to enter into force in 2016, some implementing acts will have to be passed first. These require 51 of 101 MPs to be in favor.

With the next elections looming in March 2015, the law may make headlines again, and it is not inconceivable that the act will be a defining element shaping the landscape in long-running culture wars.

The Family Act, which was not affected by the bill, continues to define marriage as being between a man and a woman.

The Reform Party, the ruling party which championed the bill along with the Social Democrats, hailed the passage as a game-changer.

In a political process that saw protests, petitions and social media campaigns, top Reform Party MP and former justice minister Kristen Michal said it debunked the myth that Estonians were closed-minded.

"Estonia is very small. There are too few people for building walls between neighbors," he said.

"We have received many letters from people who say they are ordinary people with their own stories who urge us to adopt or not adopt the Cohabitation Act. They're very personal stories. Someone already said it's material for a book."

He thanked both opponents and supporters for giving "food for thought."

Eiki Nestor, the speaker and a leading Social Democrat, said the bill had the spirit of the 1990s in it. "Back then we had such six such 'hot laws' a month." The Social Democrats members voted most unanimously in favor of the bill.

Kaia Iva, leader of the bill's most unanimous detractors, the IRL faction, criticized the bill's initiators for "being dishonest," and said the version in the third reading contained wording that provided for the possibility of adoption, something she said was not in the bill in the second reading.

She also said that the bill was stripped of procedural law standards that would otherwise have required it to be passed by an aboslute majority of 51 MPs, not by a majority of those in attendance.

The fact that opinion polls showed a majority of the population opposed the bill was prominently cited by IRL throughout the process, and IRL backed putting the Cohabitation Act to referendum.

Four IRL members were not in the "against" column in the vote: Marko Mihkelson abstained and Ene Ergma, Reet Ross and Erki Nool were no-shows.