Georgia's highest court on Wednesday overturned the murder and child cruelty convictions against a man whose toddler son died after he left him in a hot car for hours, saying the jury saw evidence that was “extremely and unfairly prejudicial.”

Justin Ross Harris, 41, was convicted in November 2016 on eight counts including malice murder in the death of his 22-month-old son, Cooper. A judge sentenced him to life without parole as well as 32 more years in prison for other crimes.

All of the Georgia Supreme Court justices agreed that there was sufficient evidence to support Harris' convictions, but the majority opinion written by Chief Justice David Nahmias says that much of the evidence having to do with Harris' sexual activities should not have been admitted and may have improperly influenced the jury. The ruling means that Harris is entitled to a new trial on the murder and child cruelty charges against him.

The high court upheld Harris’ convictions on three sex crimes committed against a 16-year-old girl that Harris had not appealed.

The Cobb County District Attorney's office, which prosecuted the case, and a lawyer for Harris did not immediately respond to requests for comment Wednesday.

Prosecutors argued that Harris was unhappy in his marriage and intentionally killed his son to free himself. To support this theory, they presented extensive evidence of extramarital sexual activities that he engaged in, including exchanging sexually explicit messages and graphic photos with women and girls and meeting some of them for sex.

The 6-3 majority opinion says that the jury “heard and saw an extensive amount of improperly admitted evidence.” It says that as prosecutors painted Harris as a man who "intentionally and maliciously" abandoned his child to die in the summer heat, they also “presented a substantial amount of evidence to lead the jury to answer a different and more legally problematic question: what kind of man is [Harris]?”

Harris, who moved from Tuscaloosa, Alabama, to the Atlanta area for work in 2012, told police he forgot to drop his son off at daycare on the morning of June 18, 2014, driving to his job as a web developer for Home Depot without remembering that Cooper was still in his car seat.

Cooper died after sitting for about seven hours in the back seat of the vehicle outside his father’s office in suburban Atlanta, where temperatures that day reached at least into the high 80s.

Defense attorneys described him as a doting father and said the boy’s death was a tragic accident.

Justice Charlie Bethel wrote a partial dissent that was joined by Justice Shawn LaGrua and Justice Verda Colvin. He said the state was “entitled to introduce, in detail, evidence of the nature, scope, and extent of the truly sinister motive it ascribed to Harris.” For that reason, Bethel wrote, the trial court did not abuse its discretion in allowing the challenged evidence.

To connect with the author of this story, or to comment, email erica.thomas@1819news.com.

Don’t miss out! Subscribe to our newsletter and get our top stories every weekday morning.