PORTLAND, Maine —The Maine Supreme Judicial Court on Thursday unanimously upheld the termination of a convicted killer’s parental rights.

Joel Hayden, 33, of New Bedford, Massachusetts, was convicted in January 2013 in Cumberland County Superior Court of two counts of murder for shooting Renee Sandora on July 25, 2011, at Sandora’s home in New Gloucester in front of Hayden’s then 7-year-old son.

Hayden also killed Trevor Mills, 28, of New Bedford, Massachusetts. Sandora was Hayden’s former girlfriend and the mother of his four children, and Mills was a longtime friend.

Hayden then fled and led police on a high-speed chase, according to previously published reports.

After the killings, the oldest son, who testified against his father at trial, began to experience sleep loss, panic attacks, and nightmares, the decision said. He and his brother continue to suffer from post-traumatic stress disorder, Maine Supreme Judicial Court Justice Joseph Jabar wrote for the court.

Hayden is serving two life sentences at the Maine State Prison in Warren.

His parental rights were terminated in 2013 by Cumberland County Probate Judge Joseph Mazziotti. Hayden and Sandora’s four children are now in the custody of family members.

Hayden appealed Mazziotti’s decision to the state Supreme Court, which considered the matter Dec. 1 on briefs but did not hear oral arguments in the case.

Jabar said in his four-page opinion the law allows for the termination of parental rights if a parent is “unable or unwilling to protect a child from jeopardy.”

Hayden argued that “the presumption of jeopardy arises only when a parent inflicts physical harm upon a child, that the murder of the children’s mother was not directed ‘toward’ the oldest son.’”

The state’s high court disagreed.

“By inflicting a mortal injury upon the mother in full view of the oldest son and then driving off, the father acted ‘toward’ and failed to protect the oldest son from a ‘profound emotional injury’ in a manner that is heinous and abhorrent to society,” Jabar wrote.

In February 2014, the justices upheld Hayden’s murder convictions and two life sentences.