Michelle Carter was sentenced to 15 months in prison for involuntary manslaughter. Carter sent her boyfriend text messages encouraging him to commit suicide. (Patrick Martin/The Washington Post)

Michelle Carter’s high school boyfriend would have killed himself regardless of what she had said in text messages, her defense attorneys said Friday.

Carter, now 20, is on trial in Massachusetts for the death of Conrad Roy III, who died of carbon monoxide poisoning in 2014. Prosecutors said she had pushed him through text messages to kill himself. Her defense attorneys said that Roy’s Internet searches prove that the 18-year-old had already decided he would kill himself — even without his girlfriend’s urging.

The Boston Herald reported that Roy Googled “suicide by cop” in the weeks leading up to his death.

His other searches included:

“Easy, quick and painless ways to commit suicide?”

“I want to kill myself, what meds shall I take to die while sleeping?”

That’s according to Steven Verronneau, a forensic investigator who testified in a Taunton, Mass., juvenile court Friday. Verronneau said he had analyzed Roy and Carter’s phones and computers, and that shortly before the teen died, Roy sent Carter a picture of a portable generator. Authorities say Roy used that, along with a water pump, to fill his pickup truck with carbon monoxide.

Roy was found dead on July 13, 2014, in a Kmart parking lot several miles outside of Boston. He and Carter had been texting the day before and in the weeks prior. She was later charged with involuntary manslaughter. Her case is being tried in juvenile court because of her age at the time of Roy’s death. A judge is hearing her case after she decided to waive her right to a jury trial.

Prosecutors argued that Carter played a “sick game” with Roy’s life, ABC affiliate WCVB reported. They alleged that dozens upon dozens of text messages from Carter pushed him to kill himself. The young woman’s attorneys, however, said that Roy’s suicidal tendencies predated the teens’ relationship and stemmed from abuse at home. They cited a domestic violence incident involving Roy and his father, according to the Herald.

Verronneau said while being cross-examined by prosecutor Katie Rayburn that some photos show Roy happy with his family.

On Thursday, witnesses read chilling text messages that prosecutors said Carter sent to Roy.

“You said you wanted this bad, I knew you weren’t gonna try hard,” she wrote in one text.

“You have to do something quick that will end it without having to worry about the pain,” she wrote in another.

“Hang yourself, jump off a building, stab yourself idk there’s a lot of yes,” read yet another message.

In another exchange read in court, Roy said, “I keep regretting the past it’s getting me upset.”

“Take your life?” Carter responded.

“Do you think I should,” he wrote back.

On Wednesday, Carter’s friends testified that she told them she was on the phone with Roy when he died.

“I heard him die. I just wish I got him more help,” Carter texted Olivia Mosolgo, who said she knew of Roy but never met him, MassLive.com reported.

Prosecutors said the two met and struck up a romantic relationship a few years before Roy died. Her attorney said they had met only a few times in person and talked mostly online or through texts.

The controversial case raises contentious questions in Massachusetts, where assisting someone in a suicide is not considered a crime. Can a person be charged and convicted in someone’s death even if she was miles away from the victim when he died? And can a person be found guilty of killing someone based solely on what she said in text messages?

Daniel Medwed, a law and criminal justice professor at Northeastern University, told The Washington Post that Carter’s text messages arguably encouraged Roy. What prosecutors must prove is whether Carter’s encouragement resulted in his death.

Carter was indicted in 2015 and appealed, taking the case to the state’s Supreme Court. Last summer, the court ruled that she could stand trial for her alleged role in Roy’s death. She faces up to 20 years in prison.

In the ruling, the court found that Carter’s “virtual presence” at the time of the suicide and the “constant pressure” she had placed on Roy, who was in a delicate mental state, were enough proof for an involuntary manslaughter charge.

Carter’s trial began on Monday and will enter its second week.

Scheduled to take the stand is Peter Breggin, a psychiatrist who’s expected to testify about Carter’s “mental condition,” the Herald reported.

Peter Holley contributed to this story.

READ MORE:

‘I mean, you’re about to die’: Teen who urged boyfriend to kill himself will stand trial

‘It’s now or never’: Texts reveal teen’s efforts to pressure boyfriend into suicide

‘Get back in’: Teen charged with pressuring boyfriend to commit suicide