An Edgerton man who was wounded by a gun he was carrying was sentenced for being a felon in possession of a firearm Wednesday in U.S. District Court for the Western District of Wisconsin.

Anthony R. Krohn, 37, of Edgerton pleaded guilty as part of a plea agreement and was sentenced to five years in prison, according to a news release from the U.S. Attorney’s Office in Madison.

Krohn was walking with friends around 2 a.m. June 1 toward Madison’s Capitol Square, where “significant civil unrest” was happening, according to the criminal complaint.

The protests were part of the nationwide reaction to the killing of George Floyd in Minneapolis on May 25. Court documents do not say whether Krohn had any interest in the protests.

“As Krohn walked past deputies who were posted outside near the (Dane County) jail, the gun that he was carrying discharged into his leg,” according to the news release.

Officers on the scene reported Krohn “appeared quite intoxicated” and was bleeding heavily from his right thigh, according to the release.

Krohn later admitted shooting himself in the leg with a .22 handgun. At the time, Krohn was on supervision for a sixth-offense intoxicated-driving conviction in Rock County after serving two years in prison.

The maximum penalty for the offense is 10 years in prison and three years of supervised release. As part of the plea agreement, the government agreed to recommend that Krohn receive the maximum possible reduction in sentence because of his acceptance of responsibility.

According to a sentencing memo from the U.S. Attorney’s Office, “While it was illegal for the defendant to possess a firearm at all, it was an incredible risk for him—an intoxicated felon—to introduce a handgun into this volatile area. He ultimately negligently discharged the gun in a place and during a time when law enforcement was already stretched thin trying to preserve life and property.”