Courts in New York have long ruled if a car smells like marijuana smoke, the police can search it — and, according to some judges, even the occupants — without a warrant.

But in late July, a judge in the Bronx said in a scathing opinion that officers claim to smell marijuana so often that it strains credulity, and she called on judges across the state to stop letting police officers get away with lying about it.

“The time has come to reject the canard of marijuana emanating from nearly every vehicle subject to a traffic stop,” Judge April Newbauer wrote in a decision in a case involving a gun the police discovered in car they had searched after claiming to have smelled marijuana.

She added, “So ubiquitous has police testimony about odors from cars become that it should be subject to a heightened level of scrutiny if it is to supply the grounds for a search.”

It is exceedingly rare for a New York City judge to accuse police officers of routinely lying to cover up illegal searches, but Judge Newbauer’s decision does exactly that. Her decision also shows how marijuana’s status as contraband remains deeply embedded in the criminal justice system, even as the police and prosecutors have begun to wind down arrests and prosecutions for marijuana.