Estonia on Thursday approved legislation recognizing the unions of gay and lesbian couples with civil partnerships, making it the first former Soviet nation to recognize such unions.

According to the AP, domestic partnerships will give straight and gay couples most of the rights afforded to married couples, though adoption rights are limited to the adoption of biological children.

The partnership act narrowly cleared parliament with two votes to spare (40-38). More than a fifth of lawmakers (23) were absent or abstained from the bill's final reading.

President Toomas Hendrik Ilves has pledged his signature. The legislation takes effect in January 2016.

“Estonia [has] made a leap toward a society that is freer, more equal and values human rights for all,” Kari Kasper, director of the Estonian Human Rights Center, told the AP.

At the same time, Kyrgyzstan, another ex-Soviet republic, is considering adopting a Russian-style law which prohibits the promotion of “gay propaganda” to minors.