A judge in Brazil has approved the country’s first gay marriage.

The country legalised civil unions in May but stopped short of granting same-sex couples the right to marry.

Yesterday, Sao Paulo state Judge Fernando Henrique Pinto ruled that two men could convert their civil union into a full marriage, Associated Press reports.

According to a court statement, he based the ruling on Brazil’s constitution.

It is not clear what wider implications the decision will have.

The couple were identified by Globo television network’s G1 website as Sergio Kauffman Sousa and Luiz Andre Moresi.

Mr Moresi told G1. “We’ve fought for so many years and now that it has happened we are in ecstasy. I dedicate this victory to all the activists.”

The ruling can be reversed by a higher court but the couple say they are willing to fight for the right to stay married.

Last month, Brazil’s president suspended an anti-homophobia campaign in schools because she thought the DVDs and leaflets were not appropriate for children.

President Dilma Rousseff’s spokesman said she had viewed the material and “didn’t like what she saw”.

The DVDs and leaflets were to be distributed in schools across the country in an effort to counter homophobia.