Prime Minister Justin Trudeau offered a parting shot in defence of Canadian media as he wrapped up a frustrating trip to China where Chinese anger at coverage of their country intruded on failed efforts to launch free trade talks.

China, which heavily censors its own press, has been emboldened by President Donald Trump's attacks on "fake news" to grow more open in denouncing international media it sees as impeding its agenda. And as Beijing flexes its economic strength and rising political sway, it has succeeded in muting unwanted criticism from many foreign leaders.

Opinion: Trudeau's China setback was a self-inflicted wound

Story continues below advertisement

On Trudeau's rocky China trip, Communist newspaper lashes out at Canadian media

Opinion: China's leaders are chasing Trudeau less now that they think he needs them

Mr. Trudeau himself could have easily ducked the topic at a final news conference in Guangzhou – or offered an anodyne comment that his job is not to be a media critic.

Instead he used his answer to defend Canadian journalism in a country critical of Western commentary, going out of his way to "thank members of the media" for doing their job even as news outlets struggle to reinvent themselves in shifting advertising markets.

The Prime Minister's comments appeared aimed more at Chinese critics than Canadian journalists. The Canadian media, he said, plays "an essential role, a challenge function."

"I really appreciate the work that you do … We [government] make your job difficult. External factors make your job difficult," he added in a lengthy response.

"But it's an essential role that you play in the success of the society. That is my perspective. That is a perspective shared by many and it's one that I am very happy to repeat today."

Story continues below advertisement

Mr. Trudeau is going home having failed to launch free-trade talks between Canada and China. The Prime Minister had been widely expected to kick off formal negotiations during what was his second official visit to China; China's ambassador had publicly forecast the start of negotiations as recently as late October.

China offered soothing words Thursday, with foreign ministry spokesman Geng Shuang saying "the negotiations have achieved some progress."

"We will take a pragmatic attitude to work with the Canadian side to promote the building of the Canada-China [free-trade agreement]," he added.

But the Chinese government appears to have resisted the Liberal leader's attempt to impose Canadian-style labour and environment standards and gender rights through a trade pact.

One business leader privately expressed frustration Tuesday, saying he had not been led to believe that these stipulations for "progressive" standards would be so stubbornly pursued by the Liberals. (Mr. Geng declined comment on areas of difference.)

For this, Mr. Trudeau was unapologetic, saying he does not believe countries can keep signing trade deals that don't carry specific benefits and supports for ordinary citizens. Those sort of accords will trigger backlashes from the public, the Prime Minister said, as has happened around the world in recent years.

Story continues below advertisement

"The rise of nationalism, the rise of protectionism, is a concern amongst citizens and ordinary folks around the world that pro-growth polices like trade haven't been good for them," he told reporters.

"That's why pushing for trade deals that benefit citizens and not just multinationals or a country's bottom line – but the actual citizens – is the only way we are going to continue to move forward constructively and effectively in an increasingly globalized world," he said.

"The alternative to trade deals that focus on citizens is no trade deals at all because the rising forces of inward thinking, of fear, of protectionism and nationalism will prevent the public confidence that is required for governments to move forward on trade deals."

After a deal failed to materialize Monday or Tuesday during Mr. Trudeau's meetings in Beijing with China's leadership, International Trade Minister François-Philippe Champagne was left behind in the capital city to keep trying to agree on the scope of talks.

No deal was apparent as of midafternoon Thursday and Mr. Champagne himself was preparing to head home without an agreement. "There was good progress made and we expect that work to continue in the weeks ahead," his director of communications Joe Pickerill said in a statement e-mailed to reporters.

Mr. Trudeau also left China adamant that not only did he raise the plight of five imprisoned Canadians with senior Chinese leaders, but that he felt very strongly about the need to protect the rights of citizens travelling abroad.

Story continues below advertisement

Those detained include: Huseyin Celil, a Uyghur dissident, imprisoned since 2006; Falun Gong practitioner Sun Qian, in jail since February; Xiao Jianhua, a billionaire abducted to mainland China from Hong Kong; and British Columbia wine merchants John Chang and Allison Lu. The Richmond, B.C., couple have been detained since May, 2016, over a customs dispute involving shipments of ice wine that Beijing says were undervalued for duty purposes.

Mr. Trudeau played down the slow pace of efforts to agree on a scope of trade talks with China. Such negotiations would be the first bilateral trade talks that China has undertaken with a Group of Seven country.

"There were never any illusions this would be quick and easy," Mr. Trudeau said.

He rejected the notion that Canada is losing control of its trade agenda after being accused by other countries of "sabotaging" the Trans-Pacific Partnership talks in Da Nang, Vietnam last month.

"We're taking this seriously because we know – both sides know – this is something that has far-reaching and long-lasting repercussions and implications, positive for our citizens and we have to ensure that they remain positive for our citizens," Mr. Trudeau said.

In China, however, the lack of an agreement to formalize trade talks pointed to frictions in the relationship, as middleweight Canada seeks to push China into accepting Western norms on delicate issues such as workers rights.

Story continues below advertisement

Liu Dan, a researcher at the Center for Canadian Studies at Guangdong University of Foreign Studies, played down the differences.

"Both countries hold different opinions in some aspects, like values, mindsets, and political system. But they've existed all along, and our bilateral relationship continues smoothly," she said.

Still, Mr. Trudeau's China visit was marked by state media anger at views about Beijing presented in the Canadian media; Ms. Liu faulted both sides for stirring confrontation, but acknowledged that "the scale of this media war is slightly greater than in the past."

On Wednesday, the Communist Party-run Global Times newspaper faulted the Canadian media for its "superiority and narcissism."

In that context, Chinese officials "must have been quite surprised" with Mr. Trudeau's defence of Canadian reporting, said Willy Lam, an expert on Chinese elite politics who is a former editor of the South China Morning Post.

China has been "trying very aggressively to influence how China is being portrayed in the Western media," he said.

Story continues below advertisement

"In the Western world, there doesn't seem to be anybody, any heavyweight person who is ready to tell the Chinese to their face directly that the situation with human rights, with civil society has deteriorated," he said. What Mr. Trudeau said "stands out. Perhaps to the credit of the Prime Minister."