SAN ANTONIO (CBSDFW.COM/AP) — A San Antonio teen accused of beating his mother with a baseball bat and slitting her throat has pleaded guilty to her murder.

Matthew Dempsey pleaded guilty Thursday in the April 8 slaying of 53-year-old Mary Dempsey. Dempsey and his friend, Daniel Apolonio Saucedo, were both 18 when they were charged with capital murder in her death.

Matthew Dempsey (Credit: San Antonio Police Department)

As part of a plea agreement, Dempsey pleaded guilty to a lesser offense of murder in exchange for his cooperation in the case and a 42-year prison term.

An arrest affidavit said the young men attacked Dempsey’s mother when she walked in on them robbing her home.

Saucedo awaits trial on the capital murder charge.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)