A guilty plea came Wednesday in a 2014 murder that rocked the community of Hanover.

Matthew Kailing pleaded guilty in an Owen Sound court to second-degree murder in the death of his friend Rick Connor.

Court heard that Kailing, who suffered from severe mental illness at the time of the attack, stabbed Connor 17 times on April 6, 2014.

The 25-year old Kailing was staying with Connor while he was trying to get back on his feet.

The court heard that Kailing was off and on his medication at the time of the attack.

Kailing was sentenced to life in jail with no chance of parole for 11 years.

He'll serve his sentence at a secure treatment facility where he'll receive help for his mental issues.