OTTAWA -- Prime Minister Justin Trudeau said Thursday that President Donald Trump made good on his pledge to raise the plight of the two Canadians imprisoned in China with President Xi Jinping.

Trudeau said Trump did raise the cases of Michael Kovrig and Michael Spavor with Xi during their meeting at the G20 leaders' summit in Japan this past weekend, just as he pledged to do in their White House meeting last month.

"I can confirm now that Mr. Trump did speak to his Chinese counterpart about the detainees," Trudeau told reporters at a transit announcement in Montreal.

It was not clear from public comments by the leaders as the summit was wrapping and the days since then whether that actually occurred. Trudeau later said he was "confident" Trump had done as he'd promised.

Trudeau also shot back at a Chinese government spokesman who accused Canada on Wednesday of being "naive" in assuming that Trump did it any favours by raising the matter with Xi.

Geng Shuang, a spokesman for China's foreign ministry, twice derided Canada for relying on a "so-called" ally and said China would allow no interference in its affairs.

"On the contrary what we're seeing really is that our allies (are) helping us and showing they're concerned about the behaviour of China towards Canada," Trudeau said Thursday.

"Our allies know it is now time to come together to support the values that we share, the rule of law as well. We'll continue to work with our allies to demonstrate to our Chinese partners that we will remain firm, steadfast and will continue to defend the rule of law and Canadians' safety."

Trudeau said Canada, the U.S. and others are telling China they're all concerned about its behaviour and that it needs to follow the rule of law and other international standards.

"And the fact that there are so many people, not just the United States but others, who are speaking clearly and strongly to China that this behaviour is not in their interest, not in China's interest, and not indeed in keeping with the peace and security and the rules-based order that we've established in the world, is a very important and effective message."

Trudeau said Canada, along with its allies, will continue to push that message "as we move forward in a global economy in which China continues and will continue to occupy a growing space, that the understanding of our rules, of the rule of law and of indeed the rules-based order is something that is clearly communicated."

Trudeau also reiterated that he had his own pull-aside conversations with Xi at the G20 that he said were "constructive as we move forward to resolve these challenges."

Conservative Leader Andrew Scheer said Wednesday Trudeau has done "nothing" to help Kovrig and Spavor.

"He's relying on the charity now of Donald Trump and other world leaders to do for him what he's not willing to do for himself, and that's stand up for this country," Scheer said at an event in Yukon.