Tensions between U.S. president John F. Kennedy and Canadian prime minister John Diefenbaker ran high even before they met.

Kennedy had mispronounced his name as “Diefenbawker” at least twice. Then there were their vastly different politics and clashes in personality: Kennedy reportedly referred to Diefenbaker as a “boring son of a b*tch” while the Canadian referred to JFK as a “boastful son of a b*itch.”

Their discord peaked when Diefenbaker refused Kennedy’s wishes to store nuclear warheads in Canada as part of a defence pact with the U.S., something that was supported by Canada’s opposition Liberal leader, Lester B. Pearson.

It also led to arguably one of the best-known examples of foreign meddling in a Canadian federal election.

Foreign interference has evolved over the years. These days, the Canadian government is worried about the spread of disinformation through social media by foreign actors such as Russia, China or Saudi Arabia ahead of the fall election.

Story continues below advertisement

But with the Diefenbaker-Kennedy feud, the meddling came from the U.S., which has historically been one of Canada’s strongest allies.

When a federal election was called in Canada in 1962, Kennedy saw an opportunity to take Diefenbaker down and impose his will on his northern neighbour — while cozying up with Pearson, who would eventually topple Diefenbaker to become the next prime minister.

Taking a break from the campaign trail in April 1962, Pearson travelled at Kennedy’s behest to Washington, D.C., for a White House dinner for Nobel Prize winners. Pearson was the only attendee who did not live in the U.S.

Upon landing, Pearson told reporters that his Liberal party “will do very well” in the upcoming election, according to a front-page article in the Toronto Daily Star regarding the trip.

WATCH BELOW: Ottawa unveils new team to stop foreign interfere

3:04 Election protection: Ottawa unveils new team to stop foreign interfere Election protection: Ottawa unveils new team to stop foreign interfere

Kennedy went even further by inviting Pearson up to the presidential apartment for a private chat that lasted 40 minutes. “Asked whether they had touched on the Canadian election campaign, Pearson replied only: ‘We were very correct,’” the newspaper reported.

Story continues below advertisement

After the election a few weeks later, Diefenbaker remained prime minister but his majority Progressive Conservative government had been slashed by 100 seats to minority status.

Still, Kennedy had solidified his support of Pearson. Behind the scenes of both the 1962 and 1963 elections, Kennedy had secretly agreed to dispatch his top pollster, Lou Harris, across the border, with a fake passport.

Harris hired 500 women to conduct elaborate public opinion polls via the phone, the results of which he provided to Pearson. While it has been described as one of the most sophisticated polling efforts in Canada, Harris has not divulged many details.

The Kennedy administration began airing its disappointment with Diefenbaker’s nuclear arms stance in a public and damning way in 1963.

The U.S. State Department issued a press release that January, criticizing Diefenbaker for not accepting the nuclear weapons and accusing him of lying to the Canadian public. The department also leaked other anti-Diefenbaker information to news outlets.

Relations between the two countries hit a low. “Canada will not be pushed around or accept external domination or interference in the making of its decision,” Diefenbaker said in the House of Commons following the press release.

Story continues below advertisement

A furious Diefenbaker recalled the Canadian ambassador, and dissent broke out within his own cabinet.

WATCH BELOW: Artists create Mark Zuckerberg ‘deepfake’

0:17 Artists create Mark Zuckerberg ‘deepfake’ Artists create Mark Zuckerberg ‘deepfake’

Though opposing party leaders were frustrated by Diefenbaker’s nuclear weapons position, they also expressed outrage at the Americans.

“I think the government of the United States should know from this Parliament that they are not dealing with Guatemala,” said NDP leader Tommy Douglas.

But within a month, Diefenbaker and his government were defeated in a vote of no-confidence. The Americans were elated and relished in their role in the undoing.

“We think Canadian public is with us,” William Butterworth, the U.S. Ambassador to Canada, wrote in a telegram to the State Department. “We see grounds for optimism that over the long run this exercise will prove to have been highly beneficial and will substantially advance our interests.”

Story continues below advertisement

And he was right: that April, Kennedy finally got his wish of seeing Pearson become prime minister. And the Liberal Party would go on to win four more elections. Pollster Harris told the Canadian Press in 2013, three years before his death, that helping Pearson defeat Diefenbaker was “one of the highlights of my life.”

For Penny Bryden, a history professor at the University of Victoria who specializes in federal politics, the Kennedy-Diefenbaker affair is perhaps the most famous example of foreign meddling in a Canadian election. But a lot depends on how one defines meddling or interference — and what that looks like has changed over time.

Bryden pointed to the 1911 election, which revolved around a free trade agreement between Canada and the U.S. “It really was affected by statements made in the House of Representatives about the trade deal representing the beginning of the end of Canada,” Bryden told Global News.

The speaker of the House said at the time: “I look forward to the time when the American flag will fly over every square foot of British North America up to the North Pole. The people of Canada are of our blood and language.”

Although not an overt instance of foreign meddling, that speech stimulated anti-American sentiment in Canada and helped propel the Conservatives to victory.

Story continues below advertisement

Today, Bryden said there is “a lot more space and a lot more entry points for outside interests to have a voice in the election. And it’s just a more porous election environment.”

Experts are warning that election threats have become more insidious and could come at Canada from a number of different foreign actors. These include China, Russia, and Saudi Arabia, all nations that currently have strained relationships with Canada. Interference can take the form of fake accounts spreading disinformation and other forms of social manipulation.

Earlier this year, the government unveiled a team of public servants who will choose when to alert the public of acts of foreign interference. The effort is meant to curb the sort of threats seen during the 2016 U.S. Presidential election.

Canada‘s National Security and Intelligence Committee of Parliamentarians is also expected to release a report on its investigation into foreign interference before the fall election.

The report will shed light on the breadth and the scope of the threat. “We‘re going to outline the primary-threat actors. We’re going to be examining the threat those actors pose to our institutions and, to a certain extent, our ethnocultural communities,” the committee chair told reporters in April.

Story continues below advertisement