CHICAGO (CBS) — A Cary man has been sentenced to 12 years in prison, after pleading guilty to attacking another man with a nail gun during a home invasion last year.

Edward Zegers, 53, pleaded guilty to home invasion and domestic battery, according to the McHenry County State’s Attorney’s Office.

READ MORE: Oak Park And River Forest High School Ban On Activities Due To COVID Outbreak Sparks Outrage

Zegers was arrested on July 2, 2017, after he broke into a home in the 7300 block of Swan Way in unincorporated Cary. Police and prosecutors said Zegers forced his way into the home, got into a fight with another man, and hit the man in the head with a concrete nail gun.

Edward Zegers pleaded guilty to charges of home invasion and domestic battery, and was sentenced to 12 years in prison for hitting a man with a nail gun during an attack in Cary, Illinois, in July 2017. (Credit: McHenry County State’s Attorney)

READ MORE: Parents Of Michigan School Shooter Arrested And Charged After Manhunt

Police found Zegers in a bedroom of the home, with injuries to his face from the fight. He was arrested and charged with attempted murder, home invasion, and residential burglary.

Zegers and McHenry County prosecutors reached a plea agreement on charges of home invasion and domestic battery.

Prosecutors said the domestic battery charge stemmed from an attack on a second victim in the home.

MORE NEWS: 12 Family Members Diagnosed With COVID-19 After Attending Milwaukee Wedding, 5 With Omicron Variant

Zegers was free on $3 million bail before pleading guilty, but has been taken into custody. He was being held at the McHenry County Jail on Monday.