HOUSTON — A man who prosecutors say was driven by vengeance when he fatally shot six members of his ex-wife’s family in Texas, including four children, was on Friday sentenced to death.

Jurors sentenced Ronald Lee Haskell after deliberating for little more than four hours. The jury had to choose between life in prison without parole or a death sentence.

The same jury last month convicted Haskell of capital murder in the 2014 killings of Stephen and Katie Stay at their home in suburban Houston. The jury rejected his attorneys’ efforts to have him found not guilty by reason of insanity.

Haskell killed the couple and four of their children in the living room of their suburban Houston home in 2014. A fifth child, 15-year-old Cassidy Stay, was shot in the head but she survived by playing dead.

During closing arguments in the punishment phase of Haskell’s trial earlier Friday, prosecutor Kaylynn Williford described the terrifying scene as Haskell fulfilled his plan to kill his ex-wife’s family.

Williford described how Haskell shot 4-year-old Zach in the shoulder — an injury he could have survived — and said the frightened child scurried in the chaos to his father on a couch, burying his head in his father’s shoulder for protection.

But by that point, Zach’s father was already dead, Williford said.

“He scrambles over to his father, because that’s what little boys do,” Williford said.

Haskell then went over to Zach, pointed a gun to the back of his head and pulled the trigger, she said.

“How cold and vengeful do you have to be to take the life of a 4-year-old?” Williford said.

Cassidy Stay, now 20, was in court on Friday and cried when Williford detailed the killing of her family. At least one juror also wiped away tears. Stay testified at trial that she begged her uncle “please don’t hurt us” before Haskell opened fire.

Defense attorneys argued hard for a life sentence.

Neal Davis III said the 39-year-old man should spend the rest of his life thinking about what he has done and “die in prison.”

Doug Durham told jurors that at the heart of prosecutors’ arguments for a death sentence is “anger, hatred, fear, vengeance because of this terrible, terrible crime.”

Durham said Haskell’s long history of mental illness, in which he was treated by multiple doctors, should be considered by the jury as a mitigating factor in deciding that life in prison would be a more appropriate sentence. His attorneys said Haskell heard voices that told him to kill his ex-wife’s family.

Durham urged jurors to consider “compassion and forgiveness” instead of “hate, anger” when making their decision.

But prosecutor Lauren Bard told jurors that Haskell’s “issue is not his mental illness, his issue is his personality,” describing him as a “manipulative, selfish, narcissistic, blame-shifting monster.”

Prosecutors said Haskell had faked symptoms of mental illness and had meticulously crafted a plan to hurt anybody who helped his ex-wife, Melannie Lyon, after the couple divorced, traveling from California to Texas to carry out the killings.

To impose a death sentence, jurors have to find Haskell would be a future danger to society and that any mitigating factors — such as mental illness — were insufficient to merit a lesser sentence.

Besides Stephen and Katie Stay and their son Zach, Haskell also killed 7-year-old Rebecca; 9-year-old Emily; and 13-year-old Bryan. Katie Stay was Lyon’s sister.

Prosecutors only needed to charge Haskell with two of the deaths to get to capital murder. In cases with multiple murders, it is a common trial strategy for prosecutors to not charge the deaths all at once in case legal issues arise and new indictments are needed.

After the shooting, he reloaded his gun and headed to the homes of Lyon’s parents and brother so, according to prosecutors, he could complete his vengeful plan. He was arrested before reaching any other homes.

During the trial’s punishment phase, relatives of the Stays told jurors how their lives were devastated by the killings.

Haskell’s brother testified that his sibling “still has good in him.”