VIERA, Fla. – Citing the Stand Your Ground law, the Fifth District Court of Appeals dismissed the longstanding charges against a Port St. John man accused of shooting a Brevard County Sheriff’s deputy during a botched arrest in front of his home in 2015.

The decision, issued Wednesday, ends the prosecution of John DeRossett, 60, on the attempted premeditated first-degree murder of a law enforcement officer while discharging a firearm, News 6 partner Florida Today reported.

DeRossett spent nearly five years at the Brevard County Jail Complex in Sharpes as he awaited a trial. He was allowed to leave on bond in March.

“The appellate decision is better than a jury acquittal. An acquittal only means not guilty. This order means that John is innocent, that his actions were justified, and that he never should have been arrested in the first place. It’s a total vindication,” said Michael Panella, DeRossett’s Orlando-based attorney.

“Great, great. Thank God. Thank Jesus. Thank everybody, thank you. You just don’t know, how it feels, you know? I’m trying to hold the tears back,” DeRossett said in a statement issued to Florida Today.

Florida Today reached out to Brevard County Sheriff Wayne Ivey for comment, but no statements have been released.

The appellate court found that DeRosset, whose attorneys argued that he did not know he was firing at deputies, was entitled to protect his home against what he thought was a threat.

Prosecutors and Brevard County sheriff’s investigators said DeRossett opened fire at deputies who were arresting his niece on a prostitution charge.

DeRossett’s attorney’s argued that he did not know who the men were confronting his niece and that he was responding to her screams for help at the front door.

The shooting took place as the sheriff’s office investigated reports of prostitution taking place at the home Mary Ellis DeRossett, 47, shared with her uncle, DeRossett.

Gunfire ensued and Deputy Casey Smith was shot in the lower abdomen. He recovered from his injuries. Both Ellis, a convicted prostitute known as The Cougar, and DeRossett, then a security guard at Port Canveral, suffered minor gunshot injuries, reports show.

The state attorney’s office issued a statement saying that it respected the court’s decision but disagreed with the outcome.