A Michigan man averted a possible jail sentence Thursday for felony battery by accepting a plea agreement that calls for him to pay some $30,000 in medical bills to the victim in the case.

Circuit judge Mark Jones sentenced Zachary Kenneth Wilson, 27, of Perry, Mich., to five years' probation in Michigan and mandated that he take anger management classes as part of a plea agreement with prosecutors.

Besides the $30,000 in medical bills, Wilson must also pay $3,300 in prosecution fees due to his failed bid last year to convince appellate judges that the case should be tossed as per Florida's "stand your ground" law.

Jones agreed to withhold adjudication on the third-degree felony battery charge in the case, meaning the charge will appear on Wilson's record, but he will retain his civil liberties and not be considered a convicted felon if he successfully completes the conditions of his sentence.

Had Wilson elected to go to trial, he would have faced a maximum possible jail sentence of five years.

Jones ruled on April 16, 2012, that defense attorney Hal Schuhmacher failed to prove that Wilson was justified when he beat former Key West resident Craig Perryman, 46, so badly he was airlifted to Miami with multiple fractures to his face and head in a May 2009 fight near an Old Town bar.

Jones' ruling was later upheld by the 3rd District Court of Appeal.

According to police, the fight occurred in a parking lot on the 1100 block of Simonton Street, initially involving four men. The employee of a nearby bar later rushed outside to stop the brawl. When police arrived, they found Perryman on the ground, his face and head bleeding, reports say.

One of the men, James Flannagan, told police he and Perryman, after leaving the Bottle Cap Lounge, were approached by two men on the street. Those men were later identified as Wilson and his younger brother, Jonathan Wilson. Flannagan said the four men struck up a conversation.

The victims allege Zachary Wilson struck Perryman, knocking him to the ground. At some point, bar employee Jason Walck ran outside to help.

Who started the fight, and how, and whether there were any weapons used -- such as a PVC pipe or coral rock -- was a matter of contention between police, Assistant State Attorney Christine Poist and Schuhmacher.

Perryman and Flannagan lived in Key West at the time, but since have moved to California and Illinois, respectively, prosecutors said.

The "stand your ground" law allows the use of deadly force when a person fears they are in danger of great bodily harm or being killed. The law effectively removed a requirement that a person try to escape before using violence against an attacker.

The law drew national attention last year after it was cited in a Sanford case involving neighborhood watch volunteer George Zimmerman, who fatally shot 17-year-old Trayvon Martin.