Federal legislation that could become law by the end of the summer will make it more difficult for police to place journalists under surveillance.

The bill, drafted by Conservative Senator Claude Carignan, would effectively bring an end to police using the tactic to identify confidential sources of information that is embarrassing to politicians and other public officials.

"It is probably the biggest step for the free press since the adoption of the Charter of Rights in 1982," Carignan told CBC News.

A public inquiry into the surveillance of journalists by Quebec police is currently underway in Montreal. It heard testimony earlier this month that police tracked the cellphone data of a journalist from La Presse after Montreal Mayor Denis Coderre became upset that someone leaked one of his old traffic tickets.

Montreal Mayor Denis Coderre's appearance came after several days of testimony that revealed he twice called the city's police chief about personal matters. (CBC) Coderre acknowledged having called then police Chief Marc Parent in 2014 to complain that his personal information was making its to reporters, seemingly from someone within the police department.

The mayor denied ordering an investigation into the leak.

Montreal police, nevertheless, responded by launching an internal affairs probe the following day, during which La Presse journalist Patrick Lagacé came under surveillance.

Carignan's bill would ensure police could only spy on journalists if there was an overriding public interest in identifying their sources, and if they had no other means of discovering that information.

The Quebec senator is following the proceedings of the inquiry, which is examining at least 10 instances when police in the province spied on journalists in recent years.

He said, based on the evidence he's heard so far, none of those case would meet the new standard set out in his bill — "I can't imagine ... that a judge would authorize a warrant with the same facts."

Bill gains government support

It is unusual for a private member's bill, let alone one that begins life in the Senate, as Carignan's did, to become law.

Carignan tabled the bill in November after it became apparent that the surveillance of journalists was more widespread than initially thought.

On Friday, as the bill underwent its second reading in the House, the governing Liberals announced they would support it, provided a number of amendments were made.

The amendments are largely technical, and have Carignan's support. Marco Mendicino, parliamentary secretary to the justice minister, said the government was alarmed at the frequency with which Quebec police resort to the tactic.

"It is clear that such conduct is profoundly troubling, as it has a potential chilling effect on the willingness of whistleblowers to come forward with their stories," Mendicino told the House.

La Presse columnist Patrick Lagacé is among the Quebec journalists who have been placed under police surveillance in recent years. (Marie-Ève Soutière/Radio-Canada)

The bill will now be studied by the Commons public safety committee. Given that it enjoys cross-party support (the NDP is also onboard), it could receive assent before the House rises for the summer. If not, it's passage will be delayed until the fall.

Either way, it appears inevitable at this stage that the bill will become law, which would dramatically alter relations between media, law enforcement and elected officials.

"I hope that it will be enforced as soon as possible," Carignan said.

Leaks part of public life

Along with raising the bar for securing court approval for wiretapping journalists, the bill would force police to seek warrants from higher-court justices, as opposed to justices of the peace, as is the case currently in Quebec.

Moreover, any information gathered from an authorized surveillance operation would automatically be sealed. Media organizations would then be given a chance to plead before a judge to keep the information out of police hands.

The Liberal amendments seek to have these protections suspended in the event a journalist is themselves suspected of wrongdoing.

Similar legislation exists in several other Western democracies. Carignan said his bill would allow Canada to catch up in terms of press freedom.

As the former mayor of Saint-Eustache, a suburb of Montreal, Carignan has himself been the subject of leaks, and knows they can be politically damaging.

"But that's part of public life," he said. "At the end of the day, it's up to Canadians to decide whether the information is something that will influence their choice in the next election."