The case before the court stemmed from the 2013 killing of a mentally ill computer engineer who was walking down a street in Oakland Park, north of Fort Lauderdale. The man, Jermaine McBean, 33, had an air rifle slung across his shoulders. As he walked into the apartment complex where he lived, screaming to himself, witnesses called the police.

Three Broward County sheriff’s deputies responded and called for Mr. McBean to drop his weapon. But Mr. McBean, who the investigation showed was listening to music with earbuds, apparently did not hear them. Peter A. Peraza, the deputy charged in the case, claimed that Mr. McBean had turned and pointed the weapon at the officers, in the vicinity of children in a swimming pool, so he fired three shots, killing him.

Witnesses said Mr. McBean never pointed the weapon, and the two other officers did not fire their weapons. Two years later, after a New York Times examination of the case, Mr. Peraza was indicted, becoming the first law enforcement officer to be charged in an on-duty killing in Florida in decades.

In court, Mr. Peraza asked for Stand Your Ground protection. He won, but the state appealed.

The Fourth District Court of Appeal upheld the ruling, but because the decision conflicted with a prior appellate ruling, the case went to the Florida Supreme Court.

In that earlier case, in 2012, the Second District Court of Appeal had rejected an officer’s attempt to use the law to avoid trial for stomping on a 63-year-old man. The officer, Juan Caamano, a former police officer in Haines City, south of Orlando, instead went to trial, but was acquitted.