FORT WORTH, Texas — A North Texas man described by prosecutors as a professional gambler with money trouble must serve life in prison for the 2016 slaying of his teacher wife in a failed attempt to collect her life insurance.

The Fort Worth Star-Telegram reports 47-year-old Mark Andrews of Azle (AY’-zil) was sentenced Thursday after being convicted of murder in the beating death of his spouse, Doris. Investigators say the 43-year-old victim was attacked with a hammer in the couple’s home.

Prosecutors say Andrews had financial problems and wanted to collect on more than $370,000 in life insurance on his wife. The victim taught in the Keller Independent School District.

Andrews, who was arrested hours after the Jan. 8, 2016, slaying, must serve at least 30 years in prison before being eligible for parole.