This story was updated at 14:20 GMT.

A lawyer for the Canadian government has said thousands of marriages between overseas gay couples which have taken place in the country since 2004 may not all be valid under domestic law.

The Globe and Mail reports that a government lawyer in a test case brought by one American and one English woman, who married in Canada in 2005 and now want to divorce, said their union was effectively invalid because they could not have married in their home countries.

The couple’s case is to be heard by the Ontario Superior Court.

Canada was one of the first countries in the world to allow equal marriage rights to gays and has seen high numbers of foreign nationals travelling there for their weddings.

The Globe and Mail said a third of the 15,000 gay marriages performed in Canada have been between overseas couples.

But Sean Gaudet, a lawyer for the Canadian Department of Justice responded to the couple’s application for a divorce saying same-sex marriages are only valid if the couple can also marry in their home countries.

The gay couple’s lawyer, Martha McCarthy, who was involved with the original legal fight to introduce equal rights said: “It is appalling and outrageous that two levels of government would be taking this position without ever having raised it before, telling anybody it was an issue or doing anything pro-active about it.

“All the while, they were handing out licences to perform marriages across the country to non-resident people.”

Evan Wolfson of Freedom to Marry told the paper the government’s position would have an effect throughout the country and the world: “One of the benefits that marriage gives to families is security and clarity. They don’t have to deal with a tangle of uncertainty.

“If the Canadian government is serious about trying to cast doubt on people’s marriages, it not only insults their dignity and hurts them personally, but it raises all sorts of complex legal and economic questions for everyone who deals with them – employers, businesses, banks, and on and on.”

The two women are seeking the right to divorce in the country, which they cannot do in the UK or America.

But the Department for Justice claims divorce is only available for those people who have lived in Canada for a year or more and have a valid marriage to dissolve.

McCarthy believes if this is the legal situation, Canada should introduce a law similar to one passed in California that meant when overseas gay couples were granted the right to marry in the state, they were also allowed to divorce there, but said this would require legislative action.

A Superior Court judge is expected to hear the case next month.