TALLAHASSEE (CBSMiami/NSF) – An appeals court Friday ruled that a correctional officer can use the state’s controversial “stand your ground” law in a case stemming from an altercation with an inmate.

Correctional officer Brad Heilman was charged with aggravated battery after an inmate was injured in an incident at Lake Correctional Institution.

A three-judge panel of the 5th District Court of Appeal sided with Heilman Friday.

A circuit judge found that Heilman could not use the “stand your ground” law in defense because of another state law that deals with circumstances when correctional officers can use force. But Friday’s seven-page opinion, written by appeals-court Judge Thomas Sawaya and joined by judges William Palmer and Wendy Berger, concluded that the Legislature intended for the “stand your ground” law to apply to correctional officers and sent the case back to circuit court.

The “stand your ground” law says people can use deadly force and do not have a duty to retreat if they think it is necessary to prevent death or great bodily harm. The law offers criminal and civil immunity in such cases.

The News Service of Florida contributed to this report.