REYKJAVIK | 
 
 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. 
 
 (Reporting Birna Bjornsdottir and Nicholas Vinocur; editing by Noah Barkin) ||||| The first same-sex marriage has taken place in Portugal, a month after a law allowing gay marriage came into effect. 
 
 Teresa Pires and Helena Paixao, both divorced mothers in their 30s who have been together since 2003, married at a Lisbon registry office. 
 
 The couple - who had campaigned for a change to the law - described it as a "great victory, a dream come true". 
 
 The Socialist government had faced fierce opposition to the law in what is a mainly Catholic country. 
 
 But a petition against the change failed to gain enough support for a referendum. 
 
 The bill was passed by parliament in January and ratified by President Anibal Cavaco Silva in May - making Portugal the sixth European country to recognise same-sex marriages.
– With little fanfare, Iceland's parliament unanimously passed a resolution legalizing gay marriage today, Reuters reports. The Althingi voted 49-0 to add mention of unions between "man and man" and "woman and woman" to the legal definition of marriage. Iceland's tolerance for homosexuality is well known—PM Johanna Sigurdardottir is the only openly gay head of state in the world. Predominantly Catholic Portugal, which is generally considered more conservative than the Scandinavian countries, legalized gay marriage last month. "The attitude in Iceland is fairly pragmatic," says a University of Iceland political scientist. "Gay marriage has not been a big issue in national politics—it's not been controversial."