RCMP investigators testified in court Thursday how they installed hidden cameras to spy on detectives suspected of snooping into confidential databases then passing that information along to criminals.

Montreal police detective Mario Lambert is accused of unlawfully retrieving information about license plates and car ownerships in exchange for payments from criminals.

In court, RCMP investigators said they had been asked by Montreal's Internal Affairs investigators to set up the cameras in the force's detective headquarters, located in Anjou.

The cameras were up for about two weeks, during the time that the 20-year veteran was accused of accessing the database.

However during the precise time that Lambert is accused of dipping into the electronic files, he was not at his desk, and consequently not on camera.

Investigation prompted by criminal's bragging



The Internal Affairs department started their investigation after hearing from a criminal contact.

This contact said he had someone within the police department who could pass along information on any license plate.

Investigators then spent two years trying to determine who was accessing the database, and planted several fake license plate numbers in order to catch their suspect.

Lambert was arrested and charged in 2009.