Smelling the drug, the officers banged loudly on King’s apartment door and identified themselves as police. The officers said they heard a noise and feared evidence was being destroyed. They kicked down the door and found King, two friends, some drugs and cash.

King was sentenced to 11 years in prison, but the Kentucky Supreme Court overturned his conviction. It said that the officers had entered the apartment illegally and that the evidence they found should not have been considered in court.

On Wednesday, the case made its way to the U.S. Supreme Court, where it will provide another chance for justices to decide when police may enter a home without permission or a warrant and not violate the Constitution’s protections against unreasonable searches.

Justice Elena Kagan spelled out the worry for some on the court.

“One of the points of the Fourth Amendment is to ensure that when people search your home, they have a warrant, and of course there are exceptions to that,” she said.

Agreeing with a test proposed by Kentucky prosecutors for when such searches are lawful could mean “essentially eviscerating the warrant requirement in the context of the one place that the Fourth Amendment was most concerned about.”

The case before the court was about one of the exceptions Kagan mentioned: so-called exigent circumstances. Those arise when police have reason to suspect criminal activity is underway, but think that if they take the time to get a warrant, a life may be endangered, a suspect may escape or evidence may be destroyed.

In this case, the Kentucky high court said police could not create the emergency they say prevented them from obtaining a warrant.

Kentucky Assistant Attorney General Joshua Farley said the Lexington police officers in this case had probable cause to search the apartment – the smell of marijuana led them to think a crime was being committed.

But there was no time to get a warrant, he said, because they heard noises that led them to think the evidence was being destroyed.

When everything police do is lawful – in this case, choosing the apartment because of the smell of marijuana, knocking on the door, announcing their presence – the evidence they recover should be admissible in court, Farley said.

Some justices seemed troubled by the prospect of police wandering halls – “They go to the apartment building and they sniff at every door,” Justice Ruth Bader Ginsburg proposed – to find cause to search.

Justice Sonia Sotomayor worried that agreeing with Farley would mean that police could always enter without a warrant if they thought drugs were being used on the other side, because police could always say they feared that the evidence would be destroyed.

Jamesa J. Drake, an assistant public defender representing Hollis, said the odor of marijuana plus the sounds the police said they heard were not enough to create the urgent circumstances necessary for bypassing a warrant.

But she faced some stiff opposition.

Justice Antonin Scalia said the police did nothing wrong. When they knocked on the door, the occupants could have answered and told police that they could not come in without a warrant.

“Everything done was perfectly lawful,” Scalia said. “It’s unfair to the criminal? Is that the problem? I really don’t understand the problem.”

Law enforcement, he said, has many constraints, “and the one thing that it has going for it is that criminals are stupid.”

But Drake said law-abiding citizens might not know how to act if police pounded on the door at 10 p.m. and demanded entry.

“Under our test, the police act unreasonably when they convey the impression to a reasonable person that entry is imminent and inevitable,” she said. The problem, she said, is when a police officer acts as if he has a warrant but does not.

Chief Justice John G. Roberts Jr. proposed a different scenario. It’s early evening, the officer “knocks quietly on the door and says, ‘We’re the police, can we talk?’ ”

“And then there was the smell of marijuana. And then he hears the sounds that do convey to a reasonable police officer that evidence is being destroyed. At that point, can they enter without a warrant?”

“Yes,” Drake answered.

Farley reminded the court that it took the case to decide whether lawful actions by police could impermissibly create exigent circumstances.

“Officers should not be held accountable for unlawful reactions by suspects,” he said.