OTTAWA -- The federal government has no immediate plans to use cellphone data to track people's movements during the COVID-19 crisis, Justin Trudeau said Tuesday.

But the prime minister did not rule out resorting to the tool at some point, saying "all options are on the table" to keep Canadians safe in exceptional times.

Trudeau's comments followed suggestions that municipal officials in Ottawa and Toronto were considering use of telecommunications data to monitor people's whereabouts in the fight against the virus.

Cellphone data could be used to create a "heat map" of where people are congregating or even to pinpoint an infected person's location.

The City of Toronto said Tuesday it will not be using phone location data, nor does it have such information, to identify people who are not practising physical distancing, despite reports quoting Mayor John Tory saying the city already had phone data.

The city said the vast majority of people who are not essential workers are staying home as directed to help stop the spread of COVID-19.

Tory had initially raised the idea of the city asking telecom providers for anonymous cellphone location information to help explain where people were gathering in large groups over the weekend to help Toronto Public Health, said Don Peat, a spokesman for the mayor.

Several telecom companies, including Bell, Rogers, Telus and Videotron, said Tuesday they had not provided such data to government officials.

In Ottawa, Dr. Vera Etches, the city's medical officer of health, played down the notion of using phone data in the battle against COVID-19 but, like Trudeau, she did not completely close the door.

"We're interested in all options so we're looking at what exists," Etches told a media teleconference.

She said there were unanswered questions about how such data-harvesting would work and whether privacy would be adequately protected. "We haven't seen that yet, that there's something that makes sense to go forward with."

In a health crisis such as COVID-19, it's understandable that governments must take extraordinary measures in the name of public health and safety, said Brian Beamish, Ontario's information and privacy commissioner.

Where possible, municipal governments should make efforts to use non-identifying data in situations where they are tracking and reporting infection rates or other information relevant to trying to control the virus, he said in a statement Tuesday.

However, when identifying information is required, public health should be the priority, Beamish said.

In such cases, governments should establish clear, public rules on how the information is collected and used, as well as how long it will be kept, to minimize the effect on privacy, he said.

The federal privacy commissioner's office said it also understands the need to use "all lawful and proportionate means" to address the health crisis.

"Legal authorities in this regard are quite broad. Still, organizations must ensure there is lawful authority for the sharing of personal information," said Vito Pilieci, a spokesman for the office.

Aggregate data, as opposed to information about an identifiable person, may not fall under the definition of personal information and, therefore, sharing would be permissible, he said.

"However, organizations would need to consider the potential risk of re-identification of individuals."

This report by The Canadian Press was first published March 24, 2020.

With files from David Paddon in Toronto