OTTAWA -- Canada's electronic spy agency issued a stark warning Friday that online attempts to influence or undermine the country's electoral process are on the increase -- and steps must be taken to counter the efforts.

Foreign Affairs Minister Chrystia Freeland calls it a serious threat to Canadian democracy -- one the government, the public and the media alike must join forces to combat.

The new report, released by the Communications Security Establishment, comes amid questions about Russia's role in the last U.S. presidential election.

While foreign states did not use cyberattacks to try to influence the last federal election in 2015, there are no guarantees they won't try in 2019, the next time Canadians are scheduled to go to the federal polls, it says.

In response, the Liberal government is promising to set aside political bickering and work with other federal parties to protect the electoral system from foreign adversaries and other nefarious actors to deal with "our shared challenge ahead in a very Canadian way," said Democratic Institutions Minister Karina Gould, the lead minister on the file.

Freeland said she's taken up the issue actively in various international meetings with like-minded allies, but she sidestepped questions about whether she has raised the issue with her Russian counterparts.

"It's an issue which has been discussed quite energetically at the NATO table and also at the G7 table," Freeland told a conference call Friday.

"It's probably worth pointing out that it's an issue we have discussed directly with our Latvian allies, because Canada is leading the battle group in Latvia."

Canada's contribution to the NATO mission in Latvia is part of the alliance's plan to bolster Europe's eastern flank to deter Russia, which annexed part of Ukraine three years ago, and has been blamed for cyberattacks in several countries in eastern Europe in recent years.

Among the steps announced Friday is to have the CSE, whose mandate includes protecting the country from cyberthreats, brief all federal parties for the first time on the dangers -- and how to protect themselves.

The electronic spy agency will also work with Elections Canada and its provincial counterparts to shore up their own defences.

Freeland said the job of guarding against such interference is one that extends beyond government.

"It needs to be a cross-party effort. It needs to be a social effort, a public effort. It's a job the media need to be very much involved in, too," she said.

"We need to all appreciate that we have a shared interest in standing up for and defending our democracy."

The CSE report, the first of its kind, looked at the threat posed by cyberactivity not only in Canada, but around the world in recent years.

It found that there has been an upward trend in such activity over the past five years, and that 13 per cent of elections held around the world this year had been targeted.

The nature of the activity runs the gamut, the report says, including efforts to suppress voter turnout, attempts to discredit or blackmail parties and candidates and an overall campaign of disinformation.

Canada has not been immune, said CSE chief Greta Bossenmaier, noting that the last federal election saw low-level cyberattacks that were most likely perpetrated by what she called "hacktivists" and cybercriminals.

While Bossenmaier said the attacks did not have any impact on the actual electoral process, she expected to see more sophisticated methods employed by such actors the next time around.

"We believe multiple hacktivist groups will make such attempts," she said. "While much of it will likely be low-sophistication, groups will likely study past operations and adopt more sophisticated means."

The bigger question is whether another country will try to influence Canada's next federal election, as Russia is alleged to have done in the U.S., France and Germany.

The CSE report doesn't name any countries, but it does warn such foreign interference could happen depending on Canada's foreign and domestic policies, and the positions taken by different federal parties.

Part of the reason for emphasizing the need to protect the electoral process -- or build resilience, as Bossenmaier described it -- is that catching perpetrators is extremely difficult.

"There is rarely any timely punishment," the CSE chief said, "and it's worth the risk."

That is particularly true when it comes to the spread of disinformation, which has taken on epic proportions with the spread of social media.

The government will be working to educate voters and increase awareness of the problem, Gould said, which includes CSE's report and working with other parties to identify other possible actions.

"Today is the first step," she said. "For the first time in the world, a democracy is informing the public about cyberthreats."