Chinese prosecutors said Friday they would formally bring espionage charges against two Canadians, Michael Spavor and Michael Kovrig, in cases widely seen as retribution for Canada’s role in helping U.S. law enforcement pursue a senior Huawei executive.

The announcement by the Supreme People’s Procuratorate almost certainly foreshadows lengthy prison sentences for Spavor, a businessman on the China-North Korea border, and Kovrig, a former diplomat who worked as a researcher in Beijing for the International Crisis Group.

With conviction rates of roughly 99.9 percent, Chinese prosecutors are nearly guaranteed to win once they bring charges in a court system that is controlled by the ruling Communist Party. The two Canadians were arrested in December 2018, days after Canadian authorities detained Huawei chief financial officer Meng Wanzhou during a layover in Vancouver at the behest of the United States, which is seeking her extradition to face fraud charges.

The cases represent just one of several overlapping areas of friction between Beijing and U.S. allies — tensions that are increasingly spanning the world and playing out in intertwined arenas, including technology and diplomacy.

Spavor and Kovrig had been held for more than 550 days without facing charges or receiving permission to regularly see their lawyers, according to Canadian officials, who have also expressed concern about the two men enduring lengthy interrogation sessions and sleep deprivation. Spavor and Kovrig had been granted periodic visits in jail by Canadian diplomats, but not since the coronavirus outbreak in January.

Their arrests in 2018, along with Meng’s, sparked 18 months of mutual recriminations and accusations of hostage-taking between Beijing and Ottawa. China has made veiled acknowledgments that the seizure of Spavor and Kovrig was tit-for-tat for Meng’s arrest; the former Chinese ambassador to Ottawa publicly likened it to “self-defense” in response to Canada’s detention of Meng as she transited through Vancouver on a business trip.

News of the indictments comes three weeks after a Canadian court ruled that Meng’s extradition could proceed. At the time, Chinese state media warned the court against ruling against Meng, who has been accused by the United States of defrauding four banks to evade U.S. sanctions on Iran.

Chinese prosecutors, who had the option to drop charges against Spavor and Kovrig while they were still technically investigating, crossed a procedural — and political — threshold Friday that suggests the cases are likely to be heading toward lengthy sentences.

A Chinese Foreign Ministry spokesman, Zhao Lijian, said Friday that the government moved forward after finding “clear facts and solid evidence.” Both men had gathered Chinese state secrets and provided them to overseas organizations, Zhao said, without offering additional details.

“China is a country with rule of law, and our judicial organs deal with cases independently,” Zhao told reporters. He went on to accuse the United States and Canada of abusing their bilateral extradition treaty to arbitrarily detain Meng.

Canadian Prime Minister Justin Trudeau, who came to power seeking to deepen economic ties with China, has been under pressure to take a tougher approach against Beijing.

Speaking to reporters in Chelsea, Quebec, Trudeau said China’s latest move left him “disappointed,” and that his government was pursuing a “wide range of public and private measures” to secure the release of the two Canadians.

“We will continue to ask the Chinese and put pressure on the Chinese government to cease the arbitrary detention of these two Canadian citizens who are being held for no other reason than the Chinese government is disappointed with the independent proceedings of the Canadian judiciary,” he said.

Robert Malley, president of the International Crisis Group, said the charges against Kovrig are “completely baseless” and “groundless.”

He said that Kovrig was “open and transparent” in his work, and Chinese officials have not provided any evidence to suggest otherwise.

“It’s deeply disappointing, but it’s wholly unsurprising,” Malley said. “From the very beginning, this has been a political case, not a legal one.”

In a similar episode in 2014, China detained a Canadian couple on espionage charges in apparent retaliation for Canada arresting and sending a Chinese businessman, Su Bin, to the United States, where he was wanted for stealing U.S. military technology.

In that instance, the Canadian man, Kevin Garratt, received an eight-year prison sentence. He was released and deported in late 2016, shortly after his sentencing, having already spent two years in jail. His wife, Julie, who was arrested with him, was released on bail in early 2015 pending trial. She later was allowed to return to Canada, where she was reunited with her husband after his release.

The cases of Meng, Spavor and Kovrig exacerbated relations between China and Canada during a period of increasing global polarization. Beijing has bemoaned the Trump administration’s efforts to rally allies against China and has responded with hard-nosed diplomacy against any country — from Canada to Australia to India — that it believes to be doing Washington’s bidding.

Weeks after arresting Spavor and Kovrig in 2018, China publicized to the Canadian media the death sentence of a Canadian man charged with drug smuggling. And last week, China announced another new death sentence — that of an Australian man arrested for trafficking methamphetamine in 2013 — as its anger with Canberra spilled over following Prime Minister Scott Morrison’s calls for an international inquiry into China’s handling of the coronavirus outbreak — a position that Beijing believed was instigated by Washington.

Tensions continue to rise. Morrison on Friday lashed out at a “sophisticated state-based cyber actor,” widely seen as a thinly veiled reference to China, for waging a broad cyber campaign against Australia’s government, public utilities, hospitals, political organizations and schools.

Zhao, the Chinese spokesman, responded by saying the claims were fabricated by an Australian think tank that was funded by the U.S. weapons manufacturers hoping to fan anti-China sentiment.

Amanda Coletta in Toronto contributed to this report.