A federal appeals court this week affirmed a $4 million award to a formerly homeless Lancaster couple for a warrantless raid by deputies that caused a man to lose a leg.

Angel Mendez and his wife sued Los Angeles County five years ago, alleging excessive force and federal civil rights violations.

The couple were living in a makeshift dwelling in 2010 when they were shot by sheriff’s deputies Christopher Conley and Jennifer Pederson, members of the Community-Oriented Policing Unit, during a warrantless raid while searching for a parolee-at-large, according to court papers.

Mendez, who was holding a rifle-style BB gun, was critically injured, resulting in the amputation of one of his legs. His wife, who was pregnant at the time, was struck once by a bullet, which shattered her collar bone.

U.S. District Judge Michael W. Fitzgerald handed down his ruling in August 2013, awarding $3.8 million to Mendez and $222,000 to his wife, for damages resulting from Fourth Amendment violations by the deputies.

According to Fitzgerald’s ruling, Conley and Pederson “violated Mr. and Mrs. Mendez’s constitutional right to be free from an unreasonable search based on the manner of entry.”

The deputies appealed to the U.S. 9th Circuit Court of Appeals, unsuccessfully arguing that the dilapidated wooden shack did not appear to be a residence and consequently a warrant was not required.

Affirming Fitzgerald’s finding, the appellate panel determined that the deputies should have known that the shack was occupied, since it was “surrounded by an air conditioning unit, electric cord, water hose, and clothes locker.”