Greece late on Tuesday enacted a human-rights' bill which allows civil partnership agreements between same-sex couples despite protests and opposition from political parties and the powerful Orthodox Church.
A growing number of European countries have established legislation allowing registered partnership rights for same-sex couples, including Britain, Spain and Cyprus, but the issue remains contentious in many other EU states.
Although Greece allowed such agreements for heterosexual couples in 2008 it excluded homosexual couples, a move which the European Court of Human Rights ruled discriminatory in 2013.
On Tuesday, 193 lawmakers in the 300-seat parliament voted in favour of similar rights for gay and lesbian couples.
Prime Minister Alexis Tsipras, who has promised social reforms to mitigate the negative impact of an EU/IMF bailout, said the bill closed "a circle of embarrassment for the state".
"This is a great moment, not only for the LGBTI (lesbian, gay, bisexual, transgender and intersex) community, but also for legal equality in Greece", Vasiliki Katrivanou, a lawmaker with Tsipras' leftist Syriza party, told parliament.
"But what is worth discussing is ... that it took us so long, that it took all these struggles", she said adding the bill should pave the way for same-sex couples' civil union, which has been Syriza's pre-election promise.
The draft law was approved by the socialist PASOK party, the centrist to Potami party, the Union of Centrists and several conservative deputies but was rejected by some lawmakers from Tsipras' right-wing coalition partner, the Independent Greeks.
Their leader and Defense Minister Panos Kammenos did not appear for the vote, which was completed after midnight.
Dozens of supporters rallied outside parliament as lawmakers debated the bill. In a symbolic move, two gay activists in clerical dresses kissed outside Athens' Metropolitan Church, in front of a banner that read "Love is not a sin".
The bill does not allow same-sex couples to marry or adopt children, as in other countries, and does not give them similar pension, tax and health rights, gay and lesbian activists said.
"We want this civil partnership, but we want it in full," said activist Dimitra Kyrilou, a civil engineer.
The bill was also rejected by the Communist party, the far-right Golden Dawn party whose leader said "church bells should toll mournfully across the country", and the Orthodox Church.
"People of the Church believe in a certain lifestyle", said Archbishop Ieronymos. "Anything outside this is a diversion."
But Syriza lawmakers said that some people "prefer to turn a blind-eye to reality" and that "darkness was defeated".
"It's about the oldest story in human relationships. Two people love each other and want to be together but they are constantly faced with hurdles", said Finance Minister Euclid Tsakalotos, who had a rainbow badge pinned on his jacket.
"The Greek state must not stigmatise people."