%mlink(STRY:; PHOTO:; AUDIO:%)

SAN FRANCISCO (AP) _ A federal appeals court Friday overturned the death sentence of a man convicted of murdering and attempting to rape an acquaintance in 1978.

Condemned inmate David Ghent's sentence was commuted to a life term.

The California Supreme Court upheld Ghent's conviction in 1987 for fatally stabbing Patricia Bert, 25, in her San Jose home. The court ruled that a psychologist's illegally obtained mental analysis of the defendant did not prejudice the outcome of the case.

The 9th U.S. Circuit Court of Appeals disagreed Friday.

State prosecutors are considering appealing the decision.

During the trial, Ghent, now 52, did not dispute whether he killed the woman. He said he did not remember the bludgeoning, but could only recall that he was standing over the woman's body with a bloody knife in his hand. She was stabbed 21 times.

Ghent claimed he was not in a proper state of mind to premeditate and intend to kill the woman or attempt to rape her.

But a psychiatrist who interviewed Ghent testified he could be held accountable for the crimes because he had a normal mental capacity and mental functioning. The jury concluded the murder was premeditated and recommended a death sentence.

The 9th Circuit concluded the psychiatrist's interview was illegal. The court wrote that, following Ghent's arrest, he asked for a lawyer but the police continued to interrogate him.

The department also encouraged him to speak with a mental health expert, the same one who later testified that his mental state during the crime was normal.

``They did not tell Ghent, however, that his statements during the psychiatric exam could be used against him in a criminal proceeding,'' Judge Stephen Reinhardt wrote for the three-judge panel. ``Instead, they said that the conversation would be a private one.''