Slideshow ( 2 images )

REYKJAVIK (Reuters) - Iceland, the only country in the world to have an openly gay head of state, passed a law on Friday allowing same-sex partners to get married in a vote which met with no political resistance.

The Althingi parliament voted 49 to zero to change the wording of marriage legislation to include matrimony between “man and man, woman and woman,” in addition to unions between men and women.

Iceland, a socially tolerant island nation of about 320,000 people, became the first country to elect an openly gay head of state in 2009 when Social Democrat Johanna Sigurdardottir became prime minister after being nominated by her party.

“The attitude in Iceland is fairly pragmatic,” said Gunnar Helgi Kristinsson, a political scientist at the University of Iceland. “It (gay marriage) has not been a big issue in national politics -- it’s not been controversial.”

The prime minister’s sexual orientation garnered far more interest among foreign media than in Iceland, where the attitude toward homosexuality has grown increasingly relaxed in the past two or three decades, Kristinsson added.

Iceland’s protestant church has yet to decide whether to allow same-sex marriages in church, although the law says “ministers will always be free to perform (gay) marriage ceremonies, but never obliged to.”

The largely protestant countries of northern Europe, including Sweden, Norway and Denmark, have all endorsed some form of civil union between same-sex couples, but the issue creates more controversy in Mediterranean Catholic nations.

In the United States, gay marriage remains a frought political issue, with laws varying widely from state to state. Vermont was the first state to allow same-sex civil unions in 1999, followed by Massachusetts and Connecticut and others.