Cake decorations are seen on a cake during a symbolic group wedding on Valentine's Day in Lima Feb. 14, 2012 The wedding was organized by the local gay community to create a discussion about the illegality of gay marriages in Peru.
Decorations are seen on a cake during a symbolic group wedding on Valentine's Day in Lima Feb. 14, 2012. The wedding was organized by the local gay community to create a discussion about the illegality of gay marriages in Peru. Photo Credit: Reuters.

On Thursday, the government of Denmark approved a law legalizing same-sex marriage. After more than two decades of being restricted to civil unions, Danish gay and lesbian couples can now elect to celebrate their commitments with formal, fully recognized nuptials.

Though the law will allow gay couples to get married in churches across the country, individual priests will be permitted to turn down officiation requests, according to Reuters.

Socially liberal Denmark is considered a pioneering country for gay rights. In 1989, it became the first country on earth to allow civil unions for gay couples. But many are wondering why it took 23 more years for marriage to be fully legalized. In the race to the gay marriage altar, Denmark has already been beaten by 10 other countries.

Internal politics had a lot to do with this legislative lag. In parliament, the conservative Danish People's Party (DPP) has long opposed gay marriage. For years, they had enough political strength to block any opposing initiatives.

DPP is a right-wing populist group founded in 1996; it has made a name for itself as a staunch defender of Danish culture. Party leader Pia Kjaersgaard is known for her vehement opposition to immigration.

In 2001 parliamentary elections, the DPP won 22 out of 179 seats in the Folketing, Denmark's parliament. That may not sound like much, but the party was strategically well-placed. They allied with centrist parties to form a strong coalition when majority votes were needed, and demanded support for their own initiatives in return.

Since their rise to power (which happened just as The Netherlands was making history by performing the first-ever legally recognized gay marriage on earth) the DPP have pulled more strings in parliament than their percentage of the popular vote -- which peaked at 13.9 percent in 2007 -- would suggest.

But that changed following the 2011 election, when the DPP lost some of its support. It is still the third-largest party in parliament, where it retains 22 seats, but its incumbent coalition fell apart in favor of a more leftist bloc. The political dynamics have shifted considerably; now, the Folketing is headed up by the Liberals and Social Democrats.

Predictably, DPP politicians put up a strong resistance to the gay marriage legalization law this year. But the measure still passed by a wide margin, and such marriages will be fully sanctioned by the state beginning on June 15.

This adds Denmark to a growing list of countries that allow gay marriage at the federal level; the others are the Netherlands, Belgium, Canada, Spain, South Africa, Norway, Sweden, Portugal, Iceland and Argentina.

But as the long fight for marriage equality in Denmark proves, the legalization of same-sex marriage is rarely a cut-and-dry issue.

For instance, Belgium's recognition of same-sex marriages in 2003 only affirmed the legitimacy of gay marriages that had been carried out in other countries. Same-sex couples could not actually wed there until 2004.

Same-sex marriages take place in the U.S., but the unions are not recognized at the federal level and have been constitutionally banned in 30 states. Four states will vote on the issue in public referendums this year. Gay marriage is legal in six U.S. states, as well as the District of Columbia.

In South Africa, which became the first African country to legalize gay marriage in 2006, churches can still refuse to perform gay marriages.

By contrast, Iceland takes the wedding cake for demonstrating a high level of acceptance. Prime Minister Johanna Sigurdardottir is believed to be the first-ever openly gay head of state. She was elected in 2009 and married her partner in 2010, just after the legalization laws were passed.

Now, after 23 years of civil unions being the only option, gay Danish couples are hoping for a similarly high level of acceptance. They look forward to finally enjoying the same nuptial rights as their heterosexual counterparts.

We have felt a little like we were living in the Middle Ages, said former Danish politician Stig Elling, who now plans to marry his long-time partner, according to The Telegraph.

I think it is positive that there is now a majority for it, and that there are so many priests and bishops who are in favor of it, and that the Danish population supports it. We have moved forward. It's 2012.