Lucifer Nguyen pleaded guilty Tuesday to murder and other charges stemming from a violent crime spree last July that terrorized residents in Mendota Heights.

As part of the plea agreement, he will spend a minimum of 30 years in prison.

On a sunny Saturday, last July 29, Nguyen broke into a woman's home and pointed a gun at her and her 2-year-old granddaughter. He burst into a senior care facility, prompting an evacuation. He then fled into an office building near Hwy. 110 and Interstate 35E and shot and killed Beverly Cory, 48, of Maplewood.

After a metro-wide manhunt, Nguyen was captured in Blaine on July 31.

He pleaded guilty Tuesday in Dakota County District Court to one count of second-degree murder and two counts of first-degree aggravated robbery. He had been facing first-degree murder, as well as burglary, assault and kidnapping charges.

County Attorney Jim Backstrom said in a statement that the plea agreement calls for a sentence of more than 45 years. Under state law, a felon must serve two-thirds of that behind bars and one-third on supervised release.

Backstrom expressed his sympathy and condolences to Cory's family and to other victims in the case.

At the time of his crime spree, Nguyen, 45, was due in court in Superior, Wis., on charges that he possessed more than a pound of methamphetamine and had allegedly punched another inmate at the Douglas County, Wis., jail while in custody there.