Montenegro has become the first European country outside both Western Europe and the EU to legalise same-sex civil partnerships.
A new bill passed on Wednesday gives same-sex couples equal legal rights as heterosexual ones except for child adoption.
Forty-two MPs voted in favour of the law in the capital Podgorica, while five were against it.
The LGBT Forum Progres group said the bill has "unspeakably tremendous importance for all LGBT persons in Montenegro".
"I honestly didn't think it would and I still can't come to my senses that this happened in Montenegro," tweeted John Barac, executive director of LGBT Forum Progress.
The bill was first rejected in August 2019 after being met with strong resistance by the Serbian Orthodox Church, the largest religious community in the country.
Montenegro's government had hoped the law would be approved to push forward with efforts to join the European Union. Improving the rights of minority groups has been seen as a necessary step for the EU integration process.
Prime Minister Dusko Markovic described the move on Twitter as "a great step in the right direction for Montenegrin society, its democratic maturity and integration processes".
"There can be no room for discrimination based on sexual orientation in a European Montenegro".
President Milo Djukanovic added on social media that the law was "one step closer to joining the most developed world democracies".
Montenegro has been a predominantly conservative society where LGBT communities have often faced harassment.
"A big step has been taken towards equality, but the road to real equality is still ahead of us," Jovan Ulicevic, director of the Spektra association, told AFP.
"We are continuing the struggle to ensure that everyone in society is respected".