NEW HAVEN, Conn. (AP) — A man convicted of killing a woman and her two daughters in a 2007 home invasion told a psychiatrist he was shocked by his co-defendant’s violence, but later found himself in a rage, strangling and then raping the woman, the doctor testified Thursday.

Dr. Eric Goldsmith took the stand for a second day as defense attorneys try to convince a New Haven Superior Court jury that Steven Hayes should be sentenced to life in prison, not given the death penalty. The same jury convicted Hayes earlier this month of killing Jennifer Hawke-Petit and her daughters, 17-year-old Hayley Petit and 11-year-old Michaela Petit, in their Cheshire home.

READ MORE: Hospital Chaplain Recalls How Unique Power Of Prayer Helped Him Recover After Near Tragedy On The Water

The defense claims Hayes, a paroled burglar and drug addict with no history of violent crimes, was led to murder by Joshua Komisarjevsky, who awaits trial. Prosecutors say both men are equally responsible.

Goldsmith said Hayes told him he was concerned someone could get hurt and that Komisarjevsky even broke into a couple of houses to show Hayes they could do it without being caught.

The psychiatrist said Hayes told him he was “in a state of shock” when Komisarjevsky calmly beat Dr. William Petit bloody with a baseball bat after they broke into the Petit house.

Goldsmith said Hayes told him he took Hawke-Petit to a bank, forcing her to withdraw money while her family remained hostages at home. When they returned, Hayes said, Komisarjevsky falsely told him William Petit had died. Hayes said Komisarjevsky also told him he had left his DNA on one of the girls, and he had to kill them.

The psychiatrist said Hayes recounted that when he saw police cars arriving outside the house, he felt Hawke-Petit had betrayed him by tipping off police from the bank, and fell into a rage during which he strangled and then raped her.

Hayes said Komisarjevsky told him “fire destroys everything,” including DNA evidence, but Hayes had expected they would take the family outside before torching the house, according to Goldsmith.

READ MORE: Police: Charles Zolot, 65, Found Dead In Queens Law Office

“He said, ‘It is like I am transported from the earth to the moon. I’m just following Josh’s lead,” Goldsmith testified of Hayes’ account.

Goldsmith said Hayes told him he poured gasoline and Komisarjevsky lit the match. Prosecutors say the girls, who were tied up, died of smoke inhalation. Their father, tied up in the basement, managed to crawl to a neighbor’s house.

The defense has presented several witnesses who described the 47-year-old Hayes’ guilt and remorse, including several suicide attempts after the home invasion. They have said he tried to overcome a childhood of abuse that led to drug addiction and burglaries for which he served 25 years in prison.

Goldsmith read from a suicide note Hayes wrote, saying, “Although I am not the monster Josh is, I am one nonetheless,” adding, “I always had the ability to change, but cowards don’t change, they become me.” He said the note was signed with the word “suicide” spelled backward.

Goldsmith also testified that Hayes was in an extreme emotional state at the time of the crime and that impaired his ability to control his conduct. But he said his conclusions were not enough to offer a legal defense such as extreme emotional disturbance.

His testimony sparked an animated cross examination by a prosecutor, who said state law would prevent the death penalty in cases where a defendant was mentally impaired to the point they can’t control their conduct. Goldsmith said he was not testifying Hayes could not conform his conduct to the law.

MORE NEWS: Officials Call On Residents To Get Vaccine In Far Rockaway And Edgemere, Zip Code With Lowest Vaccination Rate In NYC

(Copyright 2010 by The Associated Press. All Rights Reserved.)