WASHINGTON (Reuters) - The U.S. Supreme Court sided with police on Tuesday and threw out a lower court ruling that had upheld $4 million in damages awarded to a homeless couple who sued after being shot 15 times in a backyard shack by Los Angeles County sheriff’s deputies who were searching for another man.

The justices ruled 8-0 in favor of the deputies, Christopher Conley and Jennifer Pederson, and the county, nixing an earlier decision by the San Francisco-based 9th U.S. Circuit Court of Appeals. The appeals court had ruled in favor of the couple, Angel and Jennifer Mendez, who resided in the wooden shack and sustained serious injuries in the 2010 incident.

The high court’s ruling means that the 9th Circuit must review the case for a second time to determine whether the couple can recover damages because of the officers’ failure to obtain a search warrant.

The case was decided by the justices at a time of heightened concern over use of excessive force by U.S. police after a series of high-profile fatal shootings in recent years.

Writing for the court, Justice Samuel Alito faulted the appeals court’s reasoning. The appeals court had said the deputies were not immune from the lawsuit because they had provoked a violent confrontation. The district judge who awarded the damages found that the deputies did not use excessive force at the moment of the shooting but were nevertheless liable for damages because of the provocation.

Alito said that police officers cannot be held liable for excessive force under the Fourth Amendment to the U.S. Constitution, which prohibits unreasonable searches and seizures, for provoking the confrontation.

“A different Fourth Amendment violation cannot transform a later, reasonable use of force into an unreasonable seizure,” Alito wrote.

The incident took place in Lancaster, a city within Los Angeles County, after 12 officers responded to a call that a wanted parolee named Ronnie O’Dell had been spotted in the area. Deputies decided to search a shack at the rear of a house and conducted a warrantless raid. The two deputies opened the door to the shack unannounced, saw Angel Mendez holding what they thought was a rifle and shot 15 times.

Angel Mendez was in fact holding a BB gun that he used to kill rodents. His right leg was amputated below the knee as a result of the shooting. Jennifer Mendez, pregnant at the time, was shot in the back.