The ruling by a three-justice panel from California’s 2nd District Court of Appeals comes less than three weeks after Spector’s attorneys argued his 2009 conviction of second-degree murder resulted from a prejudiced trial.

The attorneys argued in the one-day appeals hearing that jurors should not have heard testimony from five women who said Spector had threatened them with a gun, years before Clarkson was found shot to death in the foyer of his home.

But presiding Justice Joan Klein, writing on behalf of the panel in an 81-page ruling, sided with prosecutors who said the testimony from the women was crucial to the case.

“The evidence showed that, when fueled by alcohol and faced with a lack or loss of control over a woman who was alone with him and in whom he had a romantic or sexual interest, Spector underwent a sharp mood swing, exhibited extreme anger and threatened the woman with a gun when she refused to do his bidding,” Klein wrote.

Spector, 71, who was famous for his layered “Wall of Sound” recording technique, met Clarkson in 2003 at a West Hollywood nightclub where she was working as a hostess.

The justices found that the evidence showed that Clarkson’s death “had neither been an accident nor a suicide.”

Spector’s first murder trial ended in a mistrial in 2007 after jurors deadlocked.

An attorney for Spector could not be reached for comment.

Spector became a millionaire by the time he turned 21, and he worked with the Beatles, the Ronettes, Cher and Leonard Cohen at the height of his fame in the 1960s and 1970s. Before his imprisonment, he lived for years as a virtual recluse in a mock castle in suburban Los Angeles.