“Shield” star Michael Jace has been sentenced to 40 years to life in prison for killing his wife, a Los Angeles judge ruled on Friday.

He was found guilty on May 31 of second-degree murder in the shooting death of his wife, April Jace, two years ago.

Jace was sentenced on Friday following an emotional hearing in which the actor admitted to killing his wife in May of 2014. The 53-year-old apologized to the family after the victim’s relatives spoke and wept in court.

His attorney told jurors that he had acted in the heat of passion, according to the Associated Press. Jace was reportedly upset that his wife planned to divorce him.

Prosecutors said that Jace shot his wife three times, with their two young sons present, at the couple’s Hyde Park home: twice in the legs and once in the back.

The couple’s 10-year-old son, Nehemiah, told jurors that he heard his father say, “‘If you like running, then run to heaven,'” before firing the second shot, the AP reports.

Popular on Variety

Jace told police that he initially intended to take his own life. He later decided to hurt his wife, not kill her, planning to shoot her in the leg with her father’s revolver.

“I was just angry,” Jace said. “All I intended to do was shoot her in the leg. And then I shot her in the leg and that was it.”

Jace played a police officer in the FX crime drama “The Shield.”