TORONTO – A Canadian court on Wednesday threw out a long-standing deal that has allowed the country to send asylum seekers back to the United States, saying it violates their rights by exposing them to likely detention on the U.S. side.

Under the Safe Third Country Agreement, which went into effect in 2004, Canada may turn back asylum seekers attempting to enter from the United States at official border crossings – and vice versa – because both countries recognize each other as safe places to seek refuge.

Justice Ann Marie McDonald wrote in her decision that “it is not the role of the Court to pass judgment on the U.S. asylum system.” But she said the applicants had provided “significant evidence of the risks and challenges” faced by asylum seekers who are returned to the United States.

“I have concluded that the actions of Canadian authorities in enforcing the [Safe Third Country Agreement] result in ineligible STCA claimants being imprisoned by U.S. authorities,” she wrote. “I have concluded that imprisonment and the attendant consequences are inconsistent with the spirit and objective of the STCA.”

McDonald said the agreement violated the right to “life, liberty and security of the person” under the Charter of Rights and Freedoms, part of Canada’s constitution. She suspended the ruling for six months to give Parliament time to respond.

The ruling could add a wrinkle to U.S.-Canada ties and deals a blow to Ottawa, which has sought U.S. help in tightening their shared border and long defended the pact as lawful.

Two men from Nigeria illegally cross the U.S. border at Roxham Road in Champlain, N.Y., into Canada in November 2019. Associated Press/Wilson Ring

Mary-Liz Power, a spokeswoman for Bill Blair, Canada’s public safety minister, said the government is aware of the decision and reviewing it. She said that the pact remains in effect until Jan. 22, 2021.

The U.S. Department of Homeland Security did not respond to a request for comment.

The agreement has been criticized by refugee advocates since the election of President Donald Trump, who has sought to limit asylum, refugee resettlement and illegal immigration in the United States. The Trump administration has pursued Safe Third Country agreements with several Central American countries.

It has been at the center of intense political debate in Canada because of a loophole, which allows asylum seekers who cross the border at unauthorized points of entry to proceed into Canada and file their claims.

More than 58,200 people have entered the country via such “irregular” border crossings and made asylum claims since Trump’s inauguration in 2017 – an influx of arrivals that has created a backlog of 90,000 claims and left migrants stuck in bureaucratic limbo for years.

Canada has asked the United States to amend the treaty. When the two neighbors closed their border to nonessential travel to stem the spread of the coronavirus in March, they also agreed to temporarily turn back asylum seekers at irregular crossings.

The case was brought in 2017 by the Canadian Council of Refugees, the Canadian Council of Churches, Amnesty International and several individual asylum seekers. They argued that the United States should not be considered a “safe” country for refugees because those who have been turned back have been subjected to detention and face the risk of being forcibly returned to their home countries where they may face persecution and other abuses.

The Canadian government argued that the process included safeguards, including the ability for refugee claimants to seek judicial review of decisions made by Canada’s border agents. The government pointed out that most of the litigants were eventually released and that Canada’s Charter of Rights and Freedoms does not apply to U.S. law or the actions of U.S. authorities.

McDonald cited the story of Nedeira Mustefa, a Muslim asylum seeker from Ethiopia, as particularly “compelling.” After Canada turned her back to the United States, Mustefa was detained and placed in solitary confinement, where she believes she was fed pork despite telling the guards she could not eat it for religious reasons. In her affidavit, she wrote that she “felt scared, alone and confused” and endured a “psychologically traumatic experience.”

“The evidence establishes that the conduct of Canadian officials in applying the provisions of the STCA will provoke certain, and known, reactions by U.S. officials,” McDonald wrote. She said “Canada cannot turn a blind eye to the consequences that befell Ms. Mustefa in its efforts to adhere to the STCA. The evidence clearly demonstrates that those returned to the U.S. by Canadian officials are detained as a penalty.”

The other applicants included a Muslim family from Syria that sought asylum in Canada after Trump issued an executive order in early 2017 barring entry to refugees and citizens from seven majority-Muslim countries, as well as a woman from El Salvador and her children. They said they received rape and extortion threats from MS-13 gang members back home.

McDonald wrote that the fact the detainees were released “does not establish that there is a fair review process available.”

Lawyers for the asylum seekers also argued that the agreement violates equality rights under the Charter of Rights and Freedoms because it disproportionately impacts women, citing a U.S. decision in 2018 to generally deny asylum claims pertaining to domestic violence or gang violence.

McDonald wrote that she would not rule on that issue because she had already found the pact to contravene the charter, but she said the risk of the litigants from El Salvardor being forcibly sent back there was “real and not speculative.”

This is not the first time Canadian groups have challenged the pact. In 2007, refugee advocacy groups successfully had the U.S. declared unsafe for refugees, but the decision was overturned on appeal.

The organizations that brought the legal challenge welcomed the ruling.

Alex Neve, secretary general of Amnesty International Canada, called on the Canadian government to revoke the order that closes the border to asylum seekers attempting to enter at unauthorized border crossings during the pandemic.

“The Safe Third Country Agreement has been the source of grave human rights violations for many years, unequivocally confirmed in this ruling,” he said in a statement. “That cannot be allowed to continue one more day.”

Comments are not available on this story.