Police can no longer search cars without a warrant unless there is both probable cause to believe a crime occurred and emergency circumstances that require immediate action, the Pennsylvania Supreme Court ruled in an opinion published Tuesday. That’s a reversal for the court, which in a 2014 opinion in the case Commonwealth v. Gary had cleared the way for warrantless searches.

The ruling will likely require the Philadelphia Police Department and others across the state to rewrite their policies on vehicle searches. Philadelphia’s current directive permits warrantless searches whenever police have reason to believe contraband is present.

Last year, an Inquirer analysis found that Philadelphia police were searching more than 2,000 people a month, on average, based on that policy. About 80% of those searches involved Black drivers — but police found such contraband as guns or drugs in their cars only 12% of the time.

Philly police also stopped more than 25,000 drivers in five years based on an alleged odor of marijuana, though often those searches turned up no drugs at all. After an Inquirer report on the practice last fall, the number of such stops plummeted.

The opinion issued Tuesday stems from one case that began when police caught a whiff of weed.

In 2016, police stopped Keith Alexander, who conceded that he “had just smoked a blunt.” He promptly handed over the bag of marijuana. The officers arrested him and used a key on his keychain to open a locked metal box they found behind the driver’s seat. It contained 10 bundles of heroin — enough to charge Alexander with drug dealing.

Alexander’s lawyers asked to suppress that evidence, but a Philadelphia Common Pleas Court judge found that it was “perfectly acceptable under Gary, to search the vehicle.”

Alexander was convicted, and Len Sosnov of the Defender Association of Philadelphia and civil-rights lawyer David Rudovsky appealed his case to the state Supreme Court, arguing that the Pennsylvania Constitution affords greater protections than the U.S. Constitution. Until 2014, the court had agreed with that stance, effectively finding that people’s cars are much like their homes — carrying the same right to privacy and requirement for judicial oversight of any search. Then, in Gary, the Republican-held court reversed course and said no warrant was required.

Now, a Democratic majority has reversed, once again citing the state constitution: “Its heightened privacy protections do not permit us to carry forward a bright-line rule that gives short shrift to citizens’ privacy rights,” the majority wrote.

Justice Kevin Dougherty, a Democrat, as well as Republicans Justice Sally Mundy and Chief Justice Thomas Saylor, filed dissenting opinions, emphasizing the importance of adhering to precedent and avoiding a “revisionist” approach.

Saylor added that the opinion “impedes the effective enforcement of criminal laws in a fashion well beyond any impact that the framers might have envisioned.”

A Philadelphia Police Department spokesperson said the city Law Department was evaluating the decision to determine what changes may be necessary to existing policies or rules. “We strive to have this completed as soon as possible so that any and all necessary changes can be communicated to our officers in a timely manner,” the spokesperson said.

Sosnov said that, in an era when warrants can be obtained quickly by phone, the decision should preserve the rights of citizens without imposing undue hardships on police. If there are both probable cause and exigent circumstances, police are still permitted to conduct a warrantless search.

“This decision is important not just for protecting people who get arrested,” Sosnov said. “It’s also for all the innocent people out there who never end up in court, because police searched the car and didn’t find anything. But it also means whenever something is found in a car that is illegal, the judges have to not just say ‘motion denied [due to] Gary’ if you move to suppress the evidence, which is what’s happened for the last six or seven years.”