A man high on drugs and alcohol who beat another man to death has been sentenced to 30 years in prison.

Dustin Freeman, 40, who pleaded guilty in July to second-degree murder in the death of 19-year-old Angel Hernandez, was sentenced Thursday, according to an Arapahoe County District Attorney’s Office news release.

“At the time of this event, Mr. Freeman had consumed methamphetamine and alcohol,” said District Court Judge Jeffrey Holmes during sentencing. But that is “no justification to beat someone to death.”

Freeman had been dating Hernandez’ roommate on and off and their relationship was sometimes volatile, the release said. Freeman, at about 2:30 a.m. on May 16, 2016, went to the roommate’s residence at the Aurora Hills Apartments but his girlfriend was not there. Freeman forced his way into the residence where he beat Hernandez to death.

Hernandez had recently moved to Colorado, in part to study aviation, the release said.

Chief Deputy District Attorney Elizabeth Oldham said: Freeman “beat the victim in a violent rage. He deserves 30 years in prison.”