OTTAWA - RCMP Staff Sgt. Hugh Stewart did not mince words.
"You have one opportunity to move up that road and clear it off or you will be arrested," he told protesters at the 1997 Asia-Pacific Economic Co-operation summit in Vancouver.
"I am going to use force, whatever force I deem necessary."
With that, Stewart unleashed blasts of pepper spray on demonstrators, earning him the nickname "Sergeant Pepper."
In the years that followed, the noxious spray, tear gas, riot shields and batons became familiar sights at anti-globalization protests.
The G20 summit of international leaders in Toronto a decade ago saw the largest mass arrests in Canadian history. More recently, controversies have erupted over how police and security agencies have handled anti-energy protests.
And now police have been criticized for not rushing to break blockades on critical transportation routes set up to protest a pipeline project on traditional Wet'suwet'en territory in northern British Columbia.
Here is a look at the evolving nature of how agencies track, police and monitor protests in Canada:
The players
Section 2(c) of the Charter of Rights and Freedoms guarantees the right of peaceful assembly. The police of jurisdiction — the RCMP, a provincial police service or a municipal force — are generally responsible for ensuring the right to dissent is upheld while being mindful of the need for public safety.
Sometimes, particularly at large gatherings with an international element, multiple police services will work together.
Legal experts, the courts and commissions of inquiry underscore the long-held tenet of police independence from government interference in carrying out these duties.
The federal Government Operations Centre is a hub for monitoring all manner of possible threats to the national interest, from hurricanes to rail blockades.
A 2014 analysis by the centre noted the use of social media, the spread of "citizen journalism" and the involvement of young people as key protest trends. The centre's close watch on demonstration activity has prompted concerns among advocates of privacy and civil liberties.
The Canadian Security Intelligence Service uses everything from "open sources" such as newspapers to undercover agents to collect information on people and groups whose activities are suspected of constituting a threat to national security.
The CSIS watchdog found in 2017 the spy service had collected some information about peaceful anti-petroleum groups, but only incidentally as it investigated legitimate threats to projects such as oil pipelines.
Tactics
The clashes between protesters and police at high-profile summit meetings spurred efforts by organizers to bolster security and limit access to venues.
Officials spent hundreds of millions of dollars on security for the 2018 meeting of G7 leaders at Malbaie, Que., which featured a heavy police presence in nearby Quebec City.
"That was very troubling to us, that there was this sort of strategy in advance to deter protests," said Alex Neve, secretary-general of Amnesty International Canada.
More recently, demonstrators have taken to Canadian streets for peaceful marches in support of causes including climate action and gender equality, he noted. "Maybe there we've got policing at its best in this context, where police are recognizing that their role really is to make sure that the space for protest is open and safe and accessible."
Police have generally shown restraint concerning the recent blockades of railways, roads and buildings in support of hereditary chiefs in British Columbia opposed to the planned Coastal GasLink pipeline.
The go-slow approach appears to be a conscious effort to avoid the sort of violent confrontation that resulted in the 1995 death of an Ojibwa protester at Ontario's Ipperwash Provincial Park.
An inquiry into that incident, released 12 years later, cited best practices in policing protests involving Indigenous disputes, including escalation of force only to prevent serious harm, as well as simply waiting, listening and talking.
Information sharing
Police and security agencies work closely with domestic and international partners, sometimes sharing information that could be retained for years or used in ways that are not readily apparent.
The Security of Canada Information Disclosure Act is one such mechanism for the sharing of security-related information among federal institutions.
Advocacy, protest, dissent, and artistic expression activities are excluded from the definition of information that can be disclosed under the act, unless these activities are carried out in conjunction with activities that undermine the security of Canada.
The Canadian Civil Liberties Association warns this still jeopardizes the rights of everyone from anti-pipeline protesters to international human-rights activists.
An ongoing court case over the now-defunct Enbridge Northern Gateway pipeline project has revealed that CSIS routinely welcomed reports from the energy industry about perceived threats and kept such information in its files in case it might prove useful later.
Emerging issues
The rapid advancement of digital technologies has given police and security agencies new tools that raise questions about the line between public and private information.
An RCMP division known as the Tactical Internet Intelligence Unit gleans information from open online sources on potential protest activity. It combed through sources about a Toronto anti-mining organizer to assemble a report detailing her age, address, education, language fluency, work experience and Facebook friends in the activist community.
Software applications such as the controversial Clearview AI can quickly sift millions of stored images and match them against photos of a person taken at a demonstration, airport or other public venue. The federal privacy commissioner and a House of Commons committee are investigating the implications of facial-recognition tools.