SAN FRANCISCO — The California Supreme Court unanimously threw out a 25-year-old death sentence Monday, with four justices writing separately to say that a DA investigator deliberately lied about and withheld evidence favorable to the defense.

The ruling is a black eye for Santa Clara County Superior Court Judge Joyce Allegro, who was the lead prosecutor at the trial before taking the bench.