A former security guard at a Florida independent living, assisted living and memory care community has been sentenced to life in prison for beating two residents in 2014 so badly that they died from their injuries.

Brian Murphy, who worked security at Atria Evergreen Woods in Spring Hill, FL, entered a plea deal Wednesday for all six counts he faced: two counts of premeditated first-degree murder, three burglary counts and one count of aggravated assault with a deadly weapon.

According to the Hernando County Sheriff’s Office and witness testimony, Murphy worked weekends and was off duty when he entered the community in the early hours of March 27, 2014. Before being spotted by a nurse who alerted security, Murphy entered the rooms of two residents and beat them with a blunt object, the sheriff’s office said. Authorities previously identified the weapon as a scissors jack and said the two victims, Miriam Lepp, 88, and Joseph Giambrone, 83, were hit in the head and upper body.

Lepp and Giambrone were taken to a trauma center with broken bones and life-threatening injuries. Two counts of attempted murder with a deadly weapon were upgraded to first-degree murder after they died.

A motive for the attacks has not been determined. Murphy passed a background check and drug test when he was hired about four months before the attack, according to Atria.

The sheriff’s office called Murphy’s actions “heinous crimes” and recognized on-duty security guard Jonathan Sousa for his actions at the time of the incident. “Sousa immediately engaged Murphy when called upon by the nursing staff. His immediate action prevented further injury to residents and staff until the arrival of law enforcement,” the sheriff’s office said.

Atria, too, told McKnight’s Senior Living that it was grateful for the actions of its employees and others.

“The incident that took place in our Evergreen Woods community in March of 2014 was tragic and senseless,” the organization said in a statement. “We are grateful for the actions of our staff and first responders who stopped the assault and hope the guilty plea gives the victims’ families peace and closure. Atria remains committed to ensuring everyone living and working in our community feels safe and supported.”