Canadians have had enough.

It takes a lot to rile people in this decidedly courteous nation. But after US President Donald Trump’s parting shots against Canadian Prime Minister Justin Trudeau on the day he left the Group of 7 summit meeting in Quebec, the country reacted with uncharacteristic outrage and defiance at a best friend’s nastiness.

“It was extremely undiplomatic and antagonistic,” Frank McKenna, a former Canadian ambassador to the United States, wrote in an email. “It was disrespectful and ill-informed.”

“All Canadians will support the prime minister in standing up to this bully,” he added. “Friends do not treat friends with such contempt.”

Even Mr Trudeau’s political foes rose to his defence.

“We will stand shoulder to shoulder with the prime minister and the people of Canada,” Doug Ford, the Trump-like renegade who was recently elected premier of Ontario, wrote on Twitter.

We will stand shoulder to shoulder with the Prime Minister and the people of Canada. My number one goal is to protect jobs in Ontario, starting with my unwavering support for our steel and aluminum workers. — Doug Ford (@fordnation) 10 June 2018

Stephen Harper, the former Conservative Prime Minister whom Mr Trudeau beat to become prime minister, told Fox News on Sunday that Mr Trump had made a mistake targeting trade relations with Canada.

“I can understand why President Trump, why the American people feel they need some better trade relationships,” he said. But, he added, “this is the wrong target.”

The ink had barely dried on the communiqué after the G7 summit meeting in Charlevoix, Quebec, when Mr Trump berated Mr Trudeau on Twitter from Air Force One, accusing him of being “very dishonest and weak” and of making up “false statements.

PM Justin Trudeau of Canada acted so meek and mild during our @G7 meetings only to give a news conference after I left saying that, “US Tariffs were kind of insulting” and he “will not be pushed around.” Very dishonest & weak. Our Tariffs are in response to his of 270% on dairy! — Donald J. Trump (@realDonaldTrump) 9 June 2018

“Based on Justin’s false statements at his news conference, and the fact that Canada is charging massive Tariffs to our US farmers, workers and companies, I have instructed our US Reps not to endorse the Communique as we look at Tariffs on automobiles flooding the US Market!” Mr Trump wrote.

As Canadians were recovering from the sting of those remarks, Mr Trump’s economic adviser Larry Kudlow piled on, saying on television that Mr Trudeau had “stabbed us in the back,” betrayed Mr Trump and made him look weak before his summit meeting on Tuesday with North Korea’s leader.

And Peter Navarro, the president’s top trade adviser, suggested on Fox News Sunday that “there’s a special place in hell” for Mr Trudeau.

Mr Trump’s ire appears to have been spurred after Mr Trudeau said Canada would retaliate against US tariffs on steel and aluminium products, calling them “kind of insulting” and saying that Canadians “are nice” but “we will not be pushed around.”

READ MORE Trump threatens US allies on trade as he exits G7 summit

These were strong words from the telegenic, soft-spoken leader, who has spent the two-day summit trying to strike a precarious balance between being Canada’s protector-in-chief but not inciting the mercurial US president. But Canadian officials said they were perplexed by Mr Trump’s reaction since nothing Mr Trudeau said was new.

From Singapore, where he is scheduled to meet with Kim Jong Un of North Korea for a historic summit, Mr Trump again took to Twitter on Monday to assail Mr Trudeau.

“Fair Trade is now to be called Fool Trade if it is not reciprocal. According to a Canada release, they make almost 100 Billion Dollars in Trade with US (guess they were bragging and got caught!),” Trump wrote. “Minimum is 17B. Tax Dairy from us at 270%. Then Justin acts hurt when called out!”

Mr Trump is not exactly popular in Canada. And the Twitter tirade threatened to inflame already boiling resentment of the president, whose anti-immigrant stances and scepticism of climate change has infuriated many in a country that prides itself on its openness and social responsibility.

AAP

A Pew Research survey published last year found that Canadian antagonism toward Mr Trump had helped reduce Canadians’ opinions of the United States to a low not seen in more than three decades, with only 43 percent of Canadians holding a favourable view of the United States.

Canadians across the political spectrum said that while the world had grown used to Mr Trump’s social media rants, the ferocity and personal tone of the insults against Mr Trudeau had crossed a line. Some even asked whether Canadians should boycott US products and stop travel south of the border.

Canada’s foreign minister, Chrystia Freeland, told reporters that Canadians should be insulted by Mr Trump’s tariffs on steel and aluminium, imposed because, the president said, Canada poses a national security threat to the United States.

“The national security pretext is absurd and frankly insulting to Canadians, the closest and strongest ally the United States has had,” Ms Freeland said.

As to the biting comments made by Kudlow, she responded: “Canada does not believe that ad hominem attacks are a particularly appropriate or useful way to conduct our relations with other countries.”

She added: “We particularly refrain from ad hominem attacks when it comes to our allies.”

Ms Freeland said she planned to continue negotiating with the Americans over trade. “We are always prepared to talk,” she said. “That’s the Canadian way — always ready to talk and always absolutely clear about standing up for Canada.”

But for now, calling the US tariffs illegal and unjustified, she reiterated Canada’s intention to impose retaliatory tariffs, starting July 1, “which is Canada Day,” she noted. “Perhaps not inappropriate.”

For Mr Trudeau, the G7 meeting has been an important test of his leadership, at home and on the global stage. On Sunday, he continued his schedule, meeting with world leaders and trying to rise above the Twitter insults from his neighbour.

He wrote on Twitter on Sunday that the agreement at Charlevoix would, among other things, strengthen “our economies,” and protect women and the environment. “That’s what matters.”

The historic and important agreement we all reached at #G7Charlevoix will help make our economies stronger & people more prosperous, protect our democracies, safeguard our environment and protect women & girls’ rights around the world. That’s what matters. https://t.co/a6D109gTlB — Justin Trudeau (@JustinTrudeau) 10 June 2018

Canadian fury at Mr Trump notwithstanding, analysts said it was difficult to overstate the damage that bad relations with him could cause to the Canadian economy. Canada relies on the United States as its only neighbour, its military ally and its largest trading partner.

About 1.9 million Canadian jobs are tied directly to trade with the United States, which absorbs almost three quarters of Canada’s exports.

“Any Canadian prime minister, no matter what the American president does or says, has to deal with the president of the United States,” said Janice Stein, founding director of the University of Toronto’s Munk School of Global Affairs.

Nevertheless, some analysts said Mr Trump’s attack could work to politically embolden Mr Trudeau, a Liberal, whose popularity has been waning here after a series of missteps and the rise of populism, including Ford’s recent election as the premier of Ontario.

John J. Kirton, director of the G7 Research Group at the University of Toronto, a network of people who study the gatherings, said Mr Trudeau, who faces an election next year, needed to appeal to rural voters in Ontario and Quebec and show that he was protecting Canada’s heartland in the face of Trump’s protectionism.

“Every Canadian prime minister has to be seen to protect the dairy sector,” Mr Kirton said. Mr Trump has repeatedly attacked Canada’s tariffs on dairy imports.

Mr Trudeau has been philosophical about the limits of Canada’s ability to placate Mr Trump.

“If the expectation was that a weekend in beautiful Charlevoix surrounded by all sorts of lovely people was going to transform the president’s outlook on trade and the world,” he said in his final news conference at the summit before the tweet storm, “then we didn’t quite perhaps meet that bar.”