BANGOR, Maine (AP) — A man who slipped into his ex-girlfriend's home and killed her before leading police on the longest manhunt in state history was sentenced Friday to 55 years in prison.

Robert Burton, 40, spent more than two months in the woods after shooting 37-year-old Stephanie Gebo in her Parkman home in June 2015. Her body was discovered by her 13-year-old daughter, who was in the home that night with her 10-year-old brother.

The Abbott man previously blamed the victim but tearfully apologized on Friday. He said he was haunted by the thought of the children finding their bloodied mother.

Prosecutors and the family sought a life prison sentence for Burton. The judge said Friday that the penalty could be a life sentence for Burton and that Burton would no longer be a threat if he's still alive when the sentence is completed.

Police say the victim kept a gun under her pillow because she feared Burton, who had a conviction for domestic violence before moving in with her.

Officials say Gebo shot Burton in the shoulder after he entered her home through a window armed with a knife and duct tape a few days after they broke up. Burton wrested the gun from her and shot her before fleeing, leaving a backpack and his jacket on the floor.

During his trial, Burton testified that he was defending himself after being shot; he said he accidentally shot Gebo three times in the back, and fled without seeking help for her.

The local community was on edge for weeks after the killing amid reports of sightings of Burton. All told, Burton was on the lam for 68 days before turning himself in.

When he turned himself in, Burton was clean shaven and in good health despite his injury. He told jail personnel, "I'm Robert Burton. I'm here to turn myself in."