A police operation against a Montreal journalist last year was part of a broad investigation into allegations that a rogue cop frequented massage parlours, wrote misleading police reports and planted bags of heroin, according to newly unsealed search warrants.

Officially, the case started in September, 2015, when an informant complained to his handling officers about a police officer named Fayçal Djelidi. According to the informant, Mr. Djelidi was known to plant small portions of drugs on pushers and users in order to force them to talk to him, the warrants said.

In short order, the 16-year veteran of the Montreal Police Service was under investigation for his policing tactics. Within a few weeks, the internal-affairs probe was expanded to look into Mr. Djelidi's off-duty proclivities, as well as his occasional phone contacts with Patrick Lagacé, a print reporter and columnist at Montreal's La Presse.

Story continues below advertisement

Globe editorial: Tracking of Quebec journalist a sign of power that's too close for comfort

Read more: Montreal Mayor Denis Coderre called ex-police chief prior to journalist's surveillance

Read more: Quebec to hold public inquiry into police surveillance of journalists

As part of the investigation into Mr. Djelidi, the Montreal Police Service obtained complete lists of incoming and outgoing calls on Mr. Lagacé's iPhone, as well as orders to track his movements using the device's GPS and to listen in on his conversations.

The revelation that Montreal police delved so deeply into a journalist's phone records sparked a furor in Quebec last fall. It was quickly followed by news of additional police investigations involving seven other journalists, mostly by the provincial Sûreté du Québec. To get to the bottom of these cases, which raised a number of disturbing questions related to the freedom of the press, the Quebec government launched a public inquiry that will start its hearings later this year.

But a clearer picture is already emerging now that a publication ban has been lifted on 20 warrants related to the Djelidi case, after a judicial application by The Globe and Mail and other media organizations. The newly unsealed documents include the first warrant, dated Jan. 19, 2016, that allowed Montreal police to delve into Mr. Lagacé's phone records.

The court documents reveal that investigators on the case suspected that Mr. Djelidi was involved in a number of dubious activities, in addition to the possibility that he was potentially leaking damaging information about the police service to the media.

Story continues below advertisement

As they tried to build a case over the leaks, the police investigators assembled a number of negative stories published in early 2016. The main one featured the case of a high-ranking officer whose bag, containing sensitive police information, was stolen from his car during a Christmas party.

However, that story was broken by TVA, which is a private network and a rival to La Presse. In fact, police officers presented no evidence in the documents used to obtain the warrants that Mr. Lagacé wrote any stories based on Mr. Djelidi's alleged leaks.

That did not stop the Montreal police from poring over details of the conversations between Mr. Djelidi and Mr. Lagacé, but also between Mr. Lagacé and his colleagues at La Presse.

The police took note that there were five contacts on Dec. 27, 2015, between Mr. Lagacé and a former La Presse journalist, Fabrice de Pierrebourg. In an interview with The Globe, however, Mr. Lagacé explained the calls were related to preparations for a holiday gathering.

The search warrants also raised questions about a story that ran on Jan. 9, 2016, about internal tensions in the Montreal Police Service, written by La Presse reporter Vincent Larouche. The warrants point out that Mr. Larouche and Mr. Lagacé spoke on the phone on Jan. 5, adding that that was the first call between the two in three weeks.

However, Mr. Lagacé explained that the pair shared neighbouring offices at La Presse and spoke regularly in person, pointing out that nothing should be read into the absence of phone contacts over three weeks.

Story continues below advertisement

In the warrants, the Montreal Police Service said high-ranking officers were aware that the investigation into Mr. Djelidi was "indirectly" focused on the work of reporters. "We reaffirm to the authorizing judge that journalists are not linked to the alleged infractions in this case, but that intercepting some of their private conversations will prove to be useful to this investigation into Montreal Police Service officers," the warrant said.

In a motion filed in Quebec Superior Court last month, however, La Presse called for all warrants used against Mr. Lagacé to be quashed. According to La Presse, the police officers who requested the warrants, and the judicial officers who approved them, went further than any other law-enforcement authorities in Canadian history to find a journalist's confidential sources.

"In this matter, the Montreal Police Service deliberately created a complete registry of telephone communications by a reporter who was not under investigation, giving itself the means to identify all of the confidential sources that he contacted over a period of many months," La Presse said in its request for judicial review, which was tabled in Quebec Superior Court.

"It appears from an analysis of the documents that these investigative techniques were not justified, nor useful to obtain progress on the real investigation under way," the motion added.

Among reporters in Quebec, there are widespread concerns that senior officials at the Montreal Police Service and the Sûreté du Québec investigated journalists in a bid to find and get rid of anyone leaking information to the media inside their organizations.

In its filing with the Quebec Superior Court, La Presse said there had been an "unprecedented witch hunt by which the Montreal Police Service used extraordinary efforts" to put an end to leaks.

Story continues below advertisement

In fact, the 19 warrants that are being made public show that the issue of media leaks was only a tangential element to the case that was being compiled against the 39-year-old Mr. Djelidi. This summer, he was charged with perjury, obstructing justice and breach of trust, as well as soliciting and obtaining sexual services.

None of the alleged crimes that he committed were related to his contacts with Mr. Lagacé or other members of the media.

Over all, the warrants paint the picture of an officer who played loose with the facts as he wrote up police reports, failed to follow proper procedure on a number of occasions, and spent much time contacting massage parlours and escort services.

It is not clear when Mr. Djelidi discovered that he was under investigation, but the warrants show he grew nervous over time. On a number of occasions, he engaged in evasive tactics to avoid being tailed by investigators, driving through countless red lights in the process, the warrants said. Mr. Djelidi also made calls to Mr. Lagacé and other individuals using public pay phones, even though he had his cellphone with him at the time.

Still, the warrants suggest Mr. Djelidi was successfully targeted by two operations that focused on the key elements of the investigation against him: an alleged propensity to falsifying police documents and to visiting massage parlours.

In the first case, starting on June 8, 2016, an informant told Mr. Djelidi and other officers about a rumour that 10 kilos of cocaine were being stashed in a downtown locker. However, the informant made sure that the information that he was providing was too vague to warrant an actual bust. Still, Mr. Djelidi and other police officers obtained a judicial order to enter into the locker – only to find bags containing a bunch of bricks, the warrants said.

Story continues below advertisement

The second operation started on June 14 when Montreal police intercepted a communication in which Mr. Djelidi called a woman who advertised erotic services on the Internet, asking if she offered "duos," a search warrant said. The woman agreed to invite a colleague for a subsequent appointment.

The following day, Mr. Djelidi visited the location in Montreal's north end, unaware that a surveillance operation by Montreal police was under way. At the time, Mr. Djelidi was on duty and using his official vehicle, according to the warrant.

Six days later, on June 21, according to the warrant, Mr. Djelidi was contacted by an RCMP officer called Nick Souccar who said he worked for the human-trafficking unit. Mr. Souccar said the national police force was watching the building at the time of Mr. Djelidi's visit on June 15. In that conversation and ensuing ones, Mr. Souccar asked repeatedly for a report that he could put on file to explain Mr. Djelidi's visit to the building.

The calls from Mr. Souccar seemingly spooked Mr. Djelidi, whose phone was tapped at that time. Mr. Djelidi engaged in a number of telephone conversations in following days, talking to unidentified acquaintances about the incident. In one call, on June 23, Mr. Djelidi said he hadn't eaten in two days, and that he would be "very happy with a five-day suspension" over this matter.

Two weeks later, the charges against Mr. Djelidi came down, with Montreal Police Chief Philippe Pichet saying that no one was above the law.

"Unfortunately, police officers committed reprehensible acts and as a police organization we have to intervene and do our job right to the end," Chief Pichet said on July 7.

Story continues below advertisement

The warrants in this case allege that Mr. Djelidi made 698 calls to massage parlours or people linked to the prostitution industry between Jan. 18 and May 4 of last year. By contrast, he had only sporadic phone and text exchanges with Mr. Lagacé, according to the warrants.

Speaking to The Globe, Mr. Lagacé said he thinks the Montreal Police Service used the investigation into Mr. Djelidi to find out whether he had other sources in the service.

"My working theory is that this was a pretext on the part of the Montreal Police Service, which used a criminal investigation to get a complete picture of my phone records," Mr. Lagacé said.