TUCSON, Ariz. — A federal appeals court has ruled that Tucson police officers were entitled to a legal shield against a wrongful-death lawsuit filed in the 2014 fatal shooting of a man who brandished a hockey stick during an encounter in an apartment.

The 9th U.S. Circuit Court of Appeals decision Friday says the officers were entitled to immunity for entering the apartment and using deadly force against Michael Duncklee.

A trial judge had ruled that Duncklee’s privacy rights were violated because the officers didn’t get a search warrant before entering the apartment, but the 9th Circuit said Duncklee had no expectation of privacy there because he knew the former tenant had been evicted.

The 9th Circuit said shooting Duncklee could be a legal acceptable use of deadly force under the circumstances.