China has warned Canada not to be "naive" in thinking that the U.S. can help smooth over issues between the two countries.

According to a government source with direct knowledge of the matter, U.S. President Donald Trump raised the case of the two Canadians being detained by Chinese authorities "in a clear and substantive way directly with" Chinese President Xi Jinping during their bilateral meeting on the sidelines of the G20 summit in Japan last week.

China is calling those types of conversations "lip service."

"We hope that the Canadian side will not be too naive," Chinese foreign ministry spokesperson Geng Shuang told a briefing in Beijing on Wednesday.

"First, Canada shouldn't naively think that gathering so-called allies to put pressure on China will work," he told reporters, speaking in Mandarin.

"Second, the Canadian side should not naively believe that its so-called allies can really make concrete efforts for Canada's interests. What they are doing at most is lip service, because after all it is a matter between China and Canada."

Tensions between the two countries have risen since Canadian officials arrested Huawei telecommunications executive Meng Wanzhou on a request from the U.S. in December.

Soon after, China imprisoned Canadian businessman Michael Spavor and Michael Kovrig, a diplomat on leave to work for a non-governmental organization, accusing them of espionage.

U.S. President Donald Trump meets with China's President Xi Jinping at the start of their bilateral meeting at the G20 leaders summit in Osaka, Japan, June 29. Prime Minister Justin Trudeau says he's confident Trump brought up the case of two detained Canadians. (Kevin Lamarque/Reuters)

Trump had promised to raise the case of Spavor and Kovrig during his June 30 meeting with Xi. On Saturday, he said he did not talk with Xi about Meng.

However, Trudeau later told reporters he was "confident" Trump had raised the subject of the two detained Canadians.

The government source said Canada has confirmed that Trump brought up the detained Canadians with Xi.

Trudeau raised detentions with president

Trump and Xi, whose governments are embroiled in a swelling trade war, agreed to resume trade talks after the U.S. offered concessions — including a promise of no new tariffs and an easing of restrictions on Huawei.

The Trump administration has said the telecommunications company is too close to the Chinese government and poses a threat to U.S. national security.

Trudeau said he personally discussed the detention of Kovrig and Spavor, along with "the larger issue of Canada-China relations," with Xi on the sidelines of the G20.

"This is an issue we take extremely seriously," he said.

In recent months, China has blocked Canadian exports of canola seed and recently took the step of halting pork and beef imports. The RCMP has been called in to investigate the origins of a pork shipment to China that allegedly arrived with a fake Canadian export certificate.

CBC Politics' new weekly Canada Votes newsletter