LAS CRUCES, N.M. — A federal court has ruled that a Dona Ana County sheriff’s detective has a legal shield against a lawsuit filed by the estate of an armed man fatally shot by the detective during a 2015 encounter in an alley.

The 10th U.S. Circuit Court of Appeals ruling Friday says Chase Thouvenell had qualified immunity because 34-year-old Michael Malone’s estate hadn’t shown that Thouvenell clearly used excessive force in violation of Malone’s Fourth Amendment rights.

Thouvenell was among officers who went to a motel to arrest Malone. He was wanted on charges of aggravated assault with a deadly weapon, felon in possession of a firearm and battery against a household member.

Authorities say Malone fled the motel through a window and was shot after he ignored commands to drop his gun.