FARMINGTON, Maine — Juan Contreras was sentenced to 50 years in prison Thursday after changing his plea to guilty in the slaying of 81-year-old Grace Burton.

Contreras waived his right to continue the trial before Justice Michaela Murphy. She accepted a plea agreement that will keep him in prison with no time suspended.

Because Contreras, 28, was born in Guatemala and is not an American citizen, he will be deported after serving his sentence. Deportation is not part of the sentence, Murphy said. It’s a consequence.

“Public safety is assured,” she said. “There’s no chance of his being in our community because he’ll be deported.”

Story continues below advertisement.

Due to the potential for earning so-called “good time” in prison, Assistant Attorney General Lisa Marchese estimated Contreras would serve at least 85 percent of the sentence, which would make him about 70 years old when he’s deported.

Murphy also ordered Contreras to pay restitution of $630 for victim counseling if he earns money in prison.

Contreras was charged with stabbing Burton 35 times in her home at Margaret Chase Smith Apartments at 195 Fairbanks Road in Farmington on June 21, 2011.

Although there’s still no answer as to why, Murphy said she found former Farmington police officer Wayne Drake’s testimony compelling and credible. It supports the state’s contention that Burton was not a target, that Contreras went into her home to rob her.

Drake, the first officer on the scene, heard Burton say “he” and “purse.”

Drake testified that he couldn’t understand whether she said, “He didn’t get my purse,” or, “He was after my purse.”

From the back window, Contreras could have seen into her lighted living room, where she was sleeping and her purse was hanging on a chair. By cutting the bedroom screen, he would have had a straight shot at the purse. He passed by medications and a locked box, but the bedroom was dark, Murphy said.

When Contreras woke her and she objected, he knew she could identify him. Murphy accepted the state’s contention that he then intentionally and knowingly assaulted her.

Contreras said he understood his right to continue the trial but pleading guilty was “the right thing to do.” He said he still did not understand the “why” of his actions but refrained from saying anything at sentencing.

“He feels horrible and doesn’t want to delay and prolong the suffering for the families,” said his attorney, David Sanders. Contreras was also defended by attorney Christopher Berryment.

Burton’s family, emotionally torn by three days of testimony, sought a quicker resolution.

The family was in agreement on the 50-year sentence, Burton’s son, Ricky Butterfield, said. On Wednesday, the family worked with court officials for nearly three hours on a 60-year plea agreement, but it was not accepted.

“I don’t want anyone to have to go through this,” Butterfield said during a court break.

“We wanted life, but there was no guarantee he’d even get 50 years,” Burton’s daughter, Julie Shaw, said outside the court. “A guarantee is better than not knowing.”

The toll on the family was evident as tears came to Shaw’s eyes. She spoke of the images of Burton dying. Images of a woman, bandaged and bleeding, that Shaw’s daughter and nephew have “burned into their minds,” she said. Images that show “what kind of animal he was.”

Before sentencing, Shaw told the court her mother died three times during the trip to a Lewiston hospital. After being woken by police that night and told her mother had been stabbed, she and her daughter, Roxanne, went to the hospital. Although her mother had a “do-not-resuscitate” order, she asked doctors to keep her alive long enough for her brothers to get there to say goodbye.