Updated

WASHINGTON — A unanimous Supreme Court on Tuesday sided with sheriff’s deputies in a legal dispute stemming from 2010, when a couple of bystanders were shot while the California deputies searched for a wanted man.

The justices overturned an award of $4 million in damages to the couple and ordered a lower court to take another look at whether the deputies could be held liable for the shooting.

Deputies were searching for a parolee when they entered the backyard shack in Lancaster, north of Los Angeles. Seeing an armed man, they fired shots that seriously wounded him and his pregnant girlfriend.

But the man wasn’t the suspect they were searching for, and it turned out he was carrying a BB gun. A federal appeals court ruled that the deputies were liable because they provoked a violent confrontation by entering the shack without a warrant.

But Justice Samuel Alito said such a “provocation rule” is not compatible with excessive force claims under the Fourth Amendment, which prohibits unreasonable searches and seizures. If the officers were reasonable in using force to defend themselves, Alito said, a court should not go back in time to see whether the incident was provoked.

Deputies had been told before they entered the cluttered backyard that a man and woman were staying in a shack there, according to court records. When they opened the door, one of the officers saw a man holding a gun, shouted “gun” and two officers fired 15 shots.

The man, Angel Mendez, said he had picked up his BB gun at the time officers entered in order to move it. As a result of the shooting, Mendez’s leg had to be amputated below the knee. His girlfriend was shot in the back.

Justice Neil Gorsuch did not take part in the case, which was argued before he joined the high court.