A Texas man convicted of bludgeoning his wife to death with a nail gun has been sentenced to 40 years in prison.

Lam Ngoc Tran, 65, pleaded guilty to murdering his wife, 49-year-old My Thai Dang, at their home on Peralta Springs Lane in Cypress, Texas, on Jan. 10, 2022, Harris County District Attorney Kim Ogg announced Thursday.

"This is a horrible murder, and it reinforces that the most dangerous time for a battered spouse is when they are trying to leave the relationship," Ogg said. "This woman was trying to get away from an abusive husband, and the only reason she is dead is because he could not stand to lose control of her."

Harris County deputies responded to a 911 call at the couple's home and discovered Dang lying in a pool of her own blood after being attacked with a heavy pneumatic nail gun, the DA's office said. She was pronounced dead at the scene.

SUSPECTED HOME INVADERS ARRESTED IN 'TARGETED KIDNAPPING’ OF COUPLE RIPPED FROM CHILDREN: POLICE

Lam Ngoc Tran

Lam Ngoc Tran, 65, was sentenced to 40 years in prison for bludgeoning his wife to death with a nail gun. (Harris County District Attorney’s Office)

The deputies also found Tran, who they believe tried to commit suicide by shooting himself with the nail gun several times after killing his wife. Tran was transported by a Life Flight helicopter to Memorial Hermann Hospital in the Texas Medical Center and survived his injuries.

According to investigators, Tran sent "goodbye" texts to loved ones before the incident.

Earlier this year, Tran pleaded guilty to murder in exchange for allowing a judge to decide punishment after a pre-sentence investigation.

DOMESTIC VIOLENCE RATES REMAIN HIGH THREE YEARS AFTER RECORD SPIKE DURING PANDEMIC

Harris County Sheriff's Office uniform

Harris County Sheriff's Office deputies responded to the couple's home to find My Thai Dang, 49, lying in a pool of her own blood after Tran attacked her. (Harris County Sheriff's Office)

Dang emigrated from Vietnam to Minnesota before moving to Houston to marry Tran. Both of them worked at a plant that manufactures HVAC equipment, according to Assistant District Attorney Matthew Magill, who is assigned to the District Attorney's Domestic Violence Division.

CLICK TO GET THE FOX NEWS APP

"They had been married six or seven years and things had escalated into a cycle of domestic violence," Magill said. "They were scheduled for a hearing for a protective order the very next day, and his response was that if he couldn’t be with her, no one would."