China has begun the trials of two Canadians who have been held for more than two years in retaliation for the detention of Huawei executive Meng Wanzhou, in a case that has deepened mistrust of Beijing in the west.

Michael Spavor, a businessman who organised cultural exchanges in North Korea, appeared in court on Friday over espionage charges in Dandong, the north-eastern Chinese city where he lived and was detained in December 2018.

The court said the hearing was not open to the public because it was a state security case and the verdict would be released at an unspecified later date.

Canadian diplomats were denied access to the hearing in what Donald Clarke, a Chinese law specialist at the George Washington University, wrote was “as clear a violation of the Canada-China Consular Agreement as can possibly exist”. The agreement guarantees Canada permission to attend any trials of its citizens in China.

Michael Kovrig, a former Canadian diplomat who worked for the International Crisis Group, a nongovernment organisation, and is also accused of espionage is set to stand trial on Monday.

Canada has described the arrests as “arbitrary”, with Marc Garneau, foreign minister, saying this week that Ottawa remained “deeply troubled by the lack of transparency surrounding these proceedings”.

China has made no secret that it is holding the two men in retaliation for the arrest of Meng, Huawei’s chief financial officer and the daughter of Ren Zhengfei, the technology group’s founder and chief executive. Meng was detained in December 2018 in Vancouver after the US requested her extradition for allegedly violating US sanctions against Iran. Meng has denied the allegations.

As Spavor’s hearing took place, top Chinese diplomats Yang Jiechi and Wang Yi held a heated meeting with US secretary of state Antony Blinken and national security adviser Jake Sullivan, in the first high-level dialogue between the two countries since Joe Biden took office as president. The Canadian government has looked to the Biden administration to help secure the release of the detained men.

The harsh treatment of the Canadians, who have had limited consular access, has become a focus of western diplomats and human rights advocates. By contrast, Meng has been granted bail and lives in her multimillion-dollar Vancouver home with comparatively light surveillance.

Kovrig and Spavor were initially held in separate undisclosed locations under a controversial form of off-grid detention known as “residential surveillance in a designated location” before being moved to formal detention centres.

Such facilities usually feature crammed cells shared with one or more other detainees. Lights are kept on at all hours and allotments of exercise, reading and writing are closely managed by Chinese guards.

China has denied that Kovrig and Spavor have been mistreated, repeating that their cases are being handled in accordance with Chinese law. The two men have been allowed to write occasional letters on select topics to family and were granted brief monthly consular visits, but these were stopped during the pandemic.

Jerome Cohen, a professor and China expert at New York University School of Law, said starting trials now allowed Beijing to retain greater flexibility in determining whether to continue holding the Canadians or release them.

“The PRC is more likely to release them after vindicating its judicial sovereignty by convicting them than by interrupting the judicial process prior to conviction,” he wrote on his blog.