A Waltham man received life in prison Thursday for the murder of his wife in 2014.

Julio Resto, 52, appeared in Middlesex Superior Court on Thursday where he pled guilty to second degree murder in connection with the December 31, 2014 death of his wife, 42-year-old Gloria Resto of Waltham, according to the district attorney's office. 

Resto was sentenced to life in prison along with 25 years probation on seven counts of assault with a dangerous weapon. 

On December 31, 2014, Waltham police responded to a well-being check at the Resto home around 5 a.m. As officers were en route, Julio Resto walked into the lobby of the Waltham Police Department with a large knife, officials said. 

After banging the knife against a glass window in the department, he left and walked down the street, still holding the knife. After officers called for him to drop the weapon, he walked toward the officers with the knife and yelled "Shoot me! I have nothing to live for! I just killed my wife!" multiple times, according to a report.

“The defendant in this case was angry at the victim who had recently asked him to move out of their shared home following tension in the relationship that had escalated around Christmas Day,” said District Attorney Marian Ryan in a statement. “On New Year’s Eve, that anger led the defendant to violently attack his wife. The attack cost Gloria Resto her life and left two boys without their mother.”

Gloria Resto had sustained approximately 21 stab wounds to the head, neck, torso and extremities, according to the autopsy report.