The California Supreme Court issued a ruling Monday upholding the murder conviction of Scott Peterson, who was convicted 16 years ago in the December 2002 killing of his pregnant wife in Modesto. But Peterson and his lawyers successfully argued that the trial judge had made errors in juror selection that may have provided for a bias in favor of capital punishment.

The murder of Laci Peterson rocked the Bay Area and the nation, inspiring at least one TV movie starring Dean Cain as Scott. Laci was 27 years old and 7 months pregnant when she disappeared on Christmas Eve 2002 from the couple's Modesto home. Her body, and that of the unborn fetus, were found four months later floating in the waters of San Francisco Bay, at Point Isabel Regional Shoreline Park in Richmond, on April 13, 2003. Five days later, Scott Peterson was arrested in La Jolla, California, near where his parents lived, having recently dyed his hair blond and packed his car with survival gear, camping equipment, $15,000 cash, and 12 Viagra tablets, among other things.

DNA evidence found in Peterson's boat — a single hair identified as Laci Peterson's attached to a pair of pliers — linked him to the murder of Laci. And the plot thickened further when a woman named Amber Frey came forward, represented by lawyer Gloria Allred, claiming she had been having an affair with Scott Peterson.

Peterson was convicted of first-degree murder in November 2004, and second-degree murder in the death of the unborn child. In March, 2005, Peterson was sentenced to death, and he's remained on San Quentin's death row ever since.

Peterson has continued to maintain his innocence, and his appeals in the case date back 2012. His attorneys have tried to argue various points, including one that suggested there was evidence that neighbors had seen Laci Peterson alive after Scott left the house on December 24, 2002. Lawyers have also tried to argue that Peterson could not have received a fair trial given the extraordinary level of publicity the case received. (The trial got a change of venue from Stanislaus County to San Mateo County, but his lawyers have said that was not far enough.)

As the Associated Press reports Monday, the court upheld the murder conviction but sided with Peterson's case regarding the death sentence.

"Peterson contends his trial was flawed for multiple reasons, beginning with the unusual amount of pretrial publicity that surrounded the case," the court wrote in today's ruling. "We reject Peterson’s claim that he received an unfair trial as to guilt and thus affirm his convictions for murder."

But, they conceded that the trial judge "made a series of clear and significant errors in jury selection that, under long-standing United States Supreme Court precedent, undermined Peterson’s right to an impartial jury at the penalty phase."

Among the errors that Peterson's lawyer, Cliff Gardner, cited in a 423-page appeal, was the fact that the trial judge allowed jurors to be rejected by the prosecution if they expressed objections to capital punishment, even if they specified that they would follow the law in delivering a sentence.

"Under United States Supreme Court precedent, these errors require us to reverse the death sentence in this case," the court said.

Another of Peterson's attorneys, Mark Geragos, tells the New York Times, "Obviously, if you death-qualify jurors in a case like this, that’s going to give you a jury with a pro-prosecution bent." And he argues that the court should have gone further in overturning the conviction since it agreed "that jury selection is fundamentally flawed."