A felon who broke into a battered women’s shelter was sentenced Friday to eight and a half years in prison.

A jury in August convicted Ernest Brown, 30, of Buffalo of second-degree burglary.

Erie County Judge Thomas P. Franczyk sentenced Brown as a second violent felony offender because of his assault conviction in 2001.

Brown had faced a maximum prison term of 15 years, according to the Erie County District Attorney’s Office.

Prosecutor Patrick B. Shanahan asked for the maximum prison sentence, noting the October 2011 crime was a daytime break-in of a William Street shelter with a female inside.

Shanahan said Brown refused to accept any responsibility for the burglary when interviewed during a pre-sentence investigation.