MONTREAL — Before he was elected Canadian prime minister, Justin Trudeau faced a consistent type of criticism from his opponents: He was too young and too eager to please, conservatives said. His economic plans added up to “unicorns and rainbows.” He did not have the gravitas to represent Canada internationally.

But President Trump has helped bring together the most bitter of Canadian enemies, as he lashed out at Trudeau following the Group of Seven meeting in Quebec, and even the country’s staunchest conservatives have publicly backed up their Liberal prime minister for taking a tough tone in the U.S.-Canada trade conflict.

“I think sometimes, you know, you have to tell the schoolyard bully that they can’t have your lunch money. And I think that’s what the prime minister did today,” said Jaime Watt, a Toronto-based conservative political strategist. “I think most Canadians would say that they were proud of their prime minister.”

German Chancellor Angela Merkel’s office posted a photo from the Group of Seven meeting in Quebec City on June 9. It quickly went viral. (Elyse Samuels/The Washington Post)

James Smith, a spokesman for the federal New Democratic Party, which is left of center, echoed those on the right. “All Canadians stand united against these inflammatory attacks on our government officials,” he said. “Mr. Trump has made a career out of using bully tactics, and we all know there’s only one way to stop a bully.”

But that sense of solidarity extends further than Trudeau’s approach this weekend, said Watt and other Canadian political insiders from across the ideological spectrum.

Whatever the prime minister’s other actions on the world stage, dealing with Trump is a unique dilemma, they said, and they have not been bothered by Trudeau’s decision to stick to civility until now.

“I can’t fault Trudeau for how he’s handled Trump or tried to handle it,” said Andrew MacDougall, who acted as communications director for former Conservative prime minister Stephen Harper.

Trudeau’s critics still love to complain about his cutesy idiosyncrasies: wearing flashy socks, being seen shirtless in public, or photobombing regular Canadians. That is beside the point, said MacDougall.

“Yeah, the socks, the selfies, whatever,” he said. “That’s kind of fun to moan about — it’s not serious. But this is a very serious issue, our economic relationship with the United States. . . . Who knows what to do with Trump? Nobody knows what to do with him. His own people don’t know what to do.”

Canadians agree this weekend was a turning point, and maybe an overall historic low, in Canada-U.S. relations. The two countries’ trade conflict has been ratcheting up for weeks, but twice recently — before and after the G-7 meeting — Trudeau repeated a certain comment, saying Canada was “polite” but “will not be pushed around.”

Trump took the second such comment, made in a news conference after the Quebec meeting, badly. In a tweet, he depicted Trudeau as two-faced, saying the prime minister had been “meek and mild” during the meetings, only to lash out afterwards. “Very dishonest & weak,” he tweeted.

Perhaps some of the falling-out boils down to a misunderstanding of Canadian etiquette, said Bruce Heyman, the former U.S. ambassador to Canada — especially for somebody who’s coming from the world that [Trump] is coming from, and has been so blunt and so confrontational in his conversations and approaches.”

Canadians, Heyman said, “are collaborators who try to find paths to solutions.” It could be easy for someone to misread them, “not taking them seriously or not understanding the resolve they have.”

In the bigger picture, Trump’s provocations are gauged to elicit a reaction, others said — and Trudeau’s response, far from off-the-cuff snarkiness, was also carefully planned.

“You know, I think this is a case of ‘kick the dog,’ ” said Fen Hampson, a political scientist at Carleton University in Ottawa.

“My reading is that Trump is, you know, trying to negotiate with the Koreans and dealing with much bigger players, the Chinese and the Europeans, on trade issues. I think he’s trying to make an example of Canada. Canada’s a small, super-friendly ally . . . and I think he’s just kind of sending a message to the rest of the world: ‘If we can treat the Canadian this way, you ain’t seen nothing yet in terms of what might be coming your way.’ ”

Hampson, whose most recent book is about former prime minister Brian Mulroney’s diplomacy, including his work striking North American trade deals, said Mulroney has continued to be a behind-the-scenes adviser to Trudeau’s government, as he has personal connections with some Trump insiders.

Trudeau has two good reasons to change his tone now, Hampson said: First, the NAFTA talks are unlikely to be resolved any time soon. Second, the next federal Canadian election is next year.

“I think he and his government feel under some pressure to talk tough and to do so publicly.”

Public opinion has been fairly supportive of Trudeau all along, including his mild approach to Trump, said Nik Nanos, a leading Canadian pollster.

“I’m not sure if it’s been niceness,” he said. “It’s been more cordial — cordial and businesslike.”

When it comes to their international image, Trudeau has been generally keeping with what Canadians demand, Nanos said.

“I think that Canadians do pride themselves on an international image where we’re seen as being cordial, friendly and even-handed in terms of trying to get along with other states,” he said.

“The reality is that even under the best of circumstances, Canada is a middle power and, you know, when you’re a middle power, you have to get along with larger powers. You’re not necessarily going to get along with larger powers by aggressively attacking them.”

But Canadians have also supported tougher stances in the past, when there’s a principled reason for taking them, Nanos said — for example, when Harper bluntly berated Russian President Vladimir Putin over the Ukrainian invasion.

Harper himself took to Fox News this weekend to criticize Trump’s actions at the G-7. Another high-profile Canadian conservative also tweeted support of Trudeau: Doug Ford, the brother of late Toronto mayor Rob Ford. “We will stand shoulder to shoulder with the Prime Minister and the people of Canada,” wrote Doug Ford, who this week was elected leader of the province of Ontario.