A Brooklyn judge has ruled that police will now need to secure an eavesdropping warrant to track cell phones of criminal suspects. 

A device called StingRay mimics cell phone towers, gathering data from nearby devices.

Some are capable of intercepting communications like phone calls and text messages. 

This decision comes as the judge ruled the NYPD improperly investigated an attempted murder suspect last year, using this tactic without a warrant.

A report by the New York Civil Liberties Union last year showed the NYPD used the Stingrays on over 1,000 occasions between 2008 and 2015. 

They were mostly used for serious offenses including rapes, murders, shooting and robberies - but sometimes for lesser crimes.

Civil rights advocates say the ruling will push the police and prosecutors to meet a higher standard in tracking cell phones.

The NYPD released a statement on the ruling that said, in part, "The NYPD has previously confirmed publicly that we use cell simulator technology in many investigations into a wide range of serious crimes.  It is the policy of the NYPD to use cell site simulator technology pursuant to a court order that is based on probable cause; a well-known and widely accepted legal standard. The particular cell site simulator technology that we use does not have the capability to allow us to intercept the content of communications on the cell phones in question. Thus we disagree with Justice Murphy’s conclusion that an “eavesdropping” warrant is required under NYS law before we can use this technology. It is our position that a court order based on a judicial finding of probable cause permits us to use cell site simulator technology."

In a statement, the Brooklyn district attorney's office said, "We are reviewing this decision and evaluating our options. We do plan to move forward with the prosecution of this case,” said a spokesman for the Brooklyn District Attorney’s office."