COPENHAGEN, Denmark (BNO NEWS) — Danish Prime Minister Helle Thorning-Schmidt on Tuesday said the government will introduce draft legislation this week to legalize same-sex marriages later this year, a move which had been expected for years.

Denmark was the first country in the world to legalize same-sex unions in 1989 but, despite a generally tolerant society towards homosexuality, politicians repeatedly rejected bills to legalize same-sex marriage. The previous Danish government also rejected a same-sex marriage bill last year.

But Thorning said the Danish government will submit a draft legislation on Wednesday which will allow same-sex couples to get married at both City Hall and the Church of Denmark if they find a priest who is willing to perform the wedding. Although some church leaders have spoken out against same-sex marriage, previous surveys have suggested that as many as 70 percent of priests are willing to marry same-sex couples.

“It will be up to each priest whether he or she will perform gay marriages, but the government gives all members of the church the right to get married in church, whether they want to marry a person of the opposite or same sex,” Thorning said during her weekly press conference on Tuesday.

Thorning, who said the new legislation will come into force on June 15, said the government’s solution respects both positions in the debate. “We found a good solution where we maintain the openness within the church, where priests can refuse to marry gay couples,” she said, adding that the bill respects each citizen’s choice.

Last year, the lesbian, gay, bisexual and transgender (LGBT) community marked the 10th anniversary of the first ever same-sex marriage in the world. The Netherlands was the first country in the world to officially recognize and allow same-sex marriages after Queen Beatrix signed the marriage bill into law on December 21, 2000. It went into law on April 1, 2001.

If Denmark legalizes same-sex marriage as expected, it will become the eleventh country in the world to perform them. Same-sex marriages are currently performed in Argentina, Belgium, Canada, Iceland, the Netherlands, Norway, Portugal, South Africa, Spain, and Sweden. Same-sex marriages are also performed in parts of the United States, Mexico and Brazil.