A Beltsville man who pleaded guilty to fatally stabbing his girlfriend in 2011 was sentenced to 12 years in prison Thursday, authorities said.

Barry Kin Lui, 63, had asked a jury to find him “not criminally responsible” for the murder of 50-year-old Lan Mu Do. But in May, a Prince George’s County jury rejected his request to be sentenced under Maryland’s version of the insanity defense. If he were found not criminally responsible, Lui could have served his sentence in a state mental health hospital.

Lui testified that he had mental breakdowns after signing over the deed to his Gaithersburg house to Do. He said he began envisioning his girlfriend of less than a year as a “devil” or “Dracula” figure when she refused to return his property and told him to move out of the Beltsville home they shared with Do’s son.

Lui will get three years credit for time he has already served and at least five years probation upon his release.

Get updates on your area delivered via e-mail