A MARYLAND appellate court on Wednesday explained its reasoning for its landmark decision earlier this month requiring police to establish probable cause and get a warrant before using a Stingray, or cell-site simulator.

The Maryland Court of Special Appeals rejected the state of Maryland’s argument that anyone turning on a phone was “voluntarily” sharing their whereabouts with the police. And the 73-page opinion also harshly rebuked Baltimore police for trying to conceal their use of Stingrays from the court.

“This is the first appellate opinion in the country to fully address the question of whether police must disclose their intent to use a cell-site simulator to a judge and obtain a probable cause warrant,” said Nathan Wessler, a staff attorney with the ACLU’s Project on Speech, Privacy, and Technology.

The panel of judges stated that “cellphone users have an objectively reasonable expectation that their cellphones will not be used as real-time tracking devices, through the direct and active interference of law enforcement.”

In court testimony last April, a Baltimore detective revealed that the Baltimore Police Department had used Stingrays more than 4,300 times since 2007, repeatedly failing to notify courts of their use in criminal cases.

Wednesday’s decision upheld the order of a Maryland trial court, which threw out evidence in the case of Kerron Andrews, a suspect in a 2014 shooting. In order to locate Andrews, police filed a “pen register” application, which has lower standards than a warrant. The application explained that Baltimore police would collect data from Andrews’s wireless service provider. Instead, they secretly used an advanced Stingray, called the “Hailstorm,” without notifying the judge.

Last year, the Baltimore Sun published a non-disclosure agreement that the Baltimore Police Department signed in 2011 with the FBI and Harris Corporation, a leading manufacturer of Stingrays. The agreement required the department to conceal its use of Stingrays “during pre-trial matters, in search warrants and related affidavits, in discovery, in response to court ordered disclosure … or in testimony in any phase of civil or criminal trial, without the prior written approval of the FBI.”

Police departments across the country have been signing similar agreements, and prosecutors have even dropped criminal cases to avoid facing questions about Stingrays.

Judge Andrea Leahy, writing for the panel, admonished the department’s secrecy: “We perceive the state’s actions in this case to protect the Hailstorm technology, driven by a nondisclosure agreement to which it bound itself, as detrimental to its position and inimical to the constitutional principles we revere.”

The ruling represents a stern warning to police not to do that again.

“The court’s withering rebuke of secret and warrantless use of invasive cellphone tracking technology shows why it is so important for these kinds of privacy invasions to be subjected to judicial review,” said Wessler.

Wednesday’s opinion adds to the growing list of appellate precedents opposing warrantless location tracking. In 2012, the U.S. Supreme Court unanimously ruled that police had to obtain a warrant before installing a tracking device on a suspect’s car. In 2014, the justices unanimously ruled again that the seizure of cellphone data during an arrest is unconstitutional. Federal courts have since found the warrantless seizure of location data unconstitutional, but Wednesday’s opinion is the first to extend the precedent to Stingrays.

Related: