An actor who played a police officer on TV was upset because his wife wanted a divorce and taunted her before fatally shooting her in their Los Angeles home while their two young sons watched, a prosecutor told jurors Tuesday.

Deputy District Attorney Tannaz Mokayef made the accusations against Michael Jace during her opening statement at his murder trial.

She said Jace had been drinking and told his wife April Jace in a text message that he had left their home but was actually waiting for her with a loaded revolver.

When she arrived, the prosecutor said, Michael Jace shot her in the back before firing two more rounds into her legs within sight of their sons — 8 and 5 at the time.

The prosecutor said one of the boys will testify that he heard his father tell his mother, "'You like to run so much. Why don't you try running to heaven?'"

Mokayef provided new details about the 2014 killing, including the actor's 911 call in which he calmly told a dispatcher, "I shot my wife."

Jace also gave instructions on how officers should enter the home so they could find the gun and not think he was still armed, and he told detectives that he shot his wife in the back after she lunged at him, the prosecutor said.

Mokayef said the evidence will prove Jace planned the killing because he believed his wife was having an affair and wanted a divorce. He spent much of April Jace's last day texting her, trying to guess who she was sleeping with.

"You will hear that on May 19, 2014, the defendant took a loaded gun, a revolver, and waited for his wife to come home and then shot her in the back and then shot her two more times in front of their kids," Mokayef told the jury of six men and six women.

The prosecutor called it a "really sad story of obsession and control."

Defense attorneys have not yet said whether they will deliver an opening statement. They have said thatJace's state of mind will be a key issue in the case.

Jace played a police officer on the FX series "The Shield" and worked steadily in small roles in films such as "Planet of the Apes," ''Boogie Nights," ''Forrest Gump" and the television series "Southland."