Switzerland’s parliament has worked out a few remaining contentions in a bill that would allow same-sex couples to marry in the country, AFP reported on Wednesday.

There seems to be an agreement on the wording of the bill, which paves the way for gays and lesbians to marry and for lesbians to access sperm donations, although the bill is likely to go for a referendum before being turned into law.

Switzerland is one of the last remaining European countries where same-sex marriage is not legal.

The country allows same-sex couples to enter into “registered partnerships”, but this does not provide the same rights as marriage, including for obtaining citizenship and the joint adoption of children.

Left-leaning parties hailed Wednesday’s agreement as “historic”.

Also read: US Supreme Court refuses to be drawn into the ‘toilet wars’

“It is about time that we put an end to institutional discrimination, and provide the same rights to everyone,” Nicolas Walder, an MP with the Greens, told the house, according to AFP which quoted a local news agency.

Parliamentarians have been debating the new bill since 2013, with multiple rounds of back and forth between the two houses.

One of the sticking points finally agreed on Wednesday– despite continued opposition from the right — was that lesbians should have access to sperm donations.

The Senate had also discussed at length the contention by right-wing parties that passing the bill would require a constitutional amendment, which automatically requires a referendum.

But parliamentarians at last came to an agreement that a simple law change was possible, without changing the constitution.

While the bill will not automatically go to a referendum, the Christian, ultra-conservative Federal Democratic Union party has already said it plans to call for a popular vote against it.

Switzerland’s direct democratic system allows for any issues that garners enough signatures to be put to the people.