DANVILLE, Ill. (WCIA) — A Danville man was convicted in Vermilion County court for illegal possession of a gun after the State’s Attorney said he accidentally shot himself with that gun.

State’s Attorney Jacqueline Lacy said Winston Douglas was mishandling a loaded gun on Jan. 21 when he accidentally pulled the trigger. The bullet struck Douglas in the leg, and he was subsequently taken to the hospital for live-saving treatment.

Lacy added that after a thorough investigation by Danville Police, officers determined Douglas was a previously convicted felon who was not allowed to have a gun. He was arrested, charged and convicted for that crime and received a sentence of eight years in prison on Tuesday.

In a press release, Lacy thanked Detective Ralph Dunham and the Danville Police Department for their efforts in the investigation.

“This investigation completed by the Danville Police Department, in cooperation with the State’s Attorney’s Office, resulted in the offender being held accountable and suffering the appropriate consequences for his criminal conduct,” Lacy said.