A Russian official has warned that if Canada violated Russian law by bringing homosexual Chechens to Canada as refugees, there will be consequences.

Kirill Kalinin, who is a spokesman for the Russian embassy in Ottawa, said of the Canadian underground railroad operating in his country: "Any legal irregularities, if proven true, shall be duly investigated." He made the comment in an e-mail to The Globe and Mail, and declined to elaborate on what laws might have been violated.

Because no Canadian government official has spoken about the program on the record, Mr. Kalinin had no further comment, adding, "We do not comment on media reports citing anonymous official 'sources.'"

Story continues below advertisement

Read More: How Canada has been secretly giving asylum to gay people in Chechnya fleeing persecution

An estimated 31 men and women from Chechnya and other parts of the North Caucasus are in Canada or safely on their way, thanks to a program involving Canadian government officials and non-govermental organizations (NGOs) in Russia and Canada.

Many of the refugees are men who were detained and tortured by Chechen officials earlier this year. After their release, they were at risk of so-called honour killings by family members. Chechnya is a conservative Muslim society in which homosexuality is despised.

The Chechen men fled to cities in Russia, where they were protected in safe houses by the Russian LGBT Network, an NGO, but where they remained at risk of discovery from Chechen officials or hostile family members.

Since June, the Canadian government has been identifying people at risk and secretly bringing them from the safe houses to Canada. Government officials said all those who qualified and were willing to come to Canada are now here or safely on the way.

It isn't known whether the Canadian program to bring those in hiding to Canada as refugees violates Russian law. But experts in immigration and refugee law say the Canadian program is unconventional but not unprecedented.

Under the United Nations Convention on Refugees, "a refugee is by definition someone who is outside their home country and cannot return to that home country because of a well-founded fear of persecution," said Matthew Jeffery, a Toronto-based immigration lawyer. By that definition, the Chechens were not refugees because Chechnya is part of the Russian Federation.

Story continues below advertisement

However, "if the Canadian government is going to a foreign country with a goal of assisting people who they consider to be persecuted in that country, then they are not bound by the refugee convention," he added. "It is more of a humanitarian effort rather than a refugee effort."

Barbara Jackman, who specializes in immigration and refugee law, agreed, adding that the government has brought people at risk in their home countries to Canada in the past.

The Canadian government has "had special programs where they recognized that there are persons in need of protection but who were still in the country," she said.

In the 1980s, Canadian officials brought people who were being persecuted out of Chile and Argentina, which at the time had repressive authoritarian governments. During the Balkan unrest of the 1990s, Canadian officials rescued Bosnians at risk, and more recently a Colombian who was in hospital has been taken out of that country, she added.

In some cases, Ms. Jackman said, the individuals were flown directly to Canada, and in others they were sent to third countries before being brought in as refugees.

Nonetheless, the Russian government is unlikely to be pleased to know that its citizens are being spirited out of the country, because it suggests that Russia can't or won't protect its own citizens. That displeasure could be made worse by knowing that Foreign Affairs Minister Chrystia Freeland took the lead in creating the underground railroad.

Story continues below advertisement

Ms. Freeland's past criticism of Russia's human-rights record and its incursions into Ukraine so displeased Russian President Vladimir Putin that the minister has been banned from entering Russia.