A US federal judge in New York has ruled that the Drug Enforcement Agency’s (DEA) use of Stingrays is inadmissible evidence because it was obtained without a warrant, using a covet cellphone tracking device.

The judge, William H. Pauley III of Federal District Court, ruled that the Stingray’s use constituted a Fourth Amendment search. “Absent a search warrant,” he wrote, “the government may not turn a citizen’s cellphone into a tracking device.”

A Stingray is basically a portable device, also known as a cell-site simulator, and is widely used by federal and local law enforcement officials around the country, including in New York, to solve crimes and locate missing people.

The Stingray mimics a cellphone tower (or cell site), and tricks cellphones into transmitting “pings” to the device, allowing agents who have narrowed down a targeted phone’s location to determine where it is in use.

In September 2015, the Justice Department announced a new policy that requires federal law enforcement officials to obtain a search warrant in most cases before using a cell-site simulator.

During a 2015 investigation, the DEA seized drugs and paraphernalia from Raymond Lambis, a defendant in a drug case. The DEA had obtained a warrant for numbers dialed from a targeted phone and the cell tower locations to which it connected. The agency narrowed it down to an approximate location and then had a DEA technician “scan the streets surrounding Lambis’ apartment complex to identify the correct building and then scan each hallway of the building to identify Lambis’ apartment.”

After DEA agents knocked on the door, the suspect’s father let them in and allowed a search. The agents also obtained consent from the son, Raymond Lambis, to search his bedroom where they found narcotics.

In the current case, the decision finds that since “pings” from Lambi’s phone needed specialized technology to receive the cell site simulator, it constituted unreasonable search.