Warning: This story contains a detailed discussion of suicide. Anyone experiencing suicidal thoughts can call the National Suicide Prevention Lifeline at 1-800-273-8255 or the Maine Crisis Hotline at 1-888-568-1112 anytime.

Sitting in his pickup truck one summer day in 2014, Conrad Roy III wavered about his plan to kill himself.

He was scared, he texted his girlfriend.

“Get back in,” she replied.

Roy did.

The 18-year-old who had long battled depression and suicidal thoughts succumbed to carbon monoxide. He was found dead the following day in a Kmart parking lot several miles outside Boston. His girlfriend, 17-year-old Michelle Carter, was charged with involuntary manslaughter.

Now, nearly three years later, Carter is on trial in a controversial case that experts say raises new and contentious questions: Can a person be charged and convicted in someone’s death even if she was not with the victim when he died? And can a person be found guilty of killing someone based solely on what she said in text messages?

Such questions are critical in a state such as Massachusetts, where assisting someone to commit suicide is not considered a crime.

The prosecution’s most damning evidence against Carter, who is now 20: dozens upon dozens of text messages in which she was pushing Roy to commit suicide. The two exchanged hundreds of text messages for several days before Roy killed himself. She insisted that he would be better off dead.

“You’re finally going to be happy in heaven. No more pain,” she told him in one message. “It’s okay to be scared and it’s normal. I mean, you’re about to die.”

They also texted early in the morning of July 12, 2014, hours before Roy’s suicide. In some of the exchanges, Carter appeared to be faulting Roy for delaying it.

“So I guess you aren’t gonna do it then, all that for nothing . . . I’m just so confused like you were so ready and determined,” she said.

When Roy said he wanted to go back to sleep, Carter suggested that “now” is the best time to do it because everyone was still sleeping.

“Just go somewhere in your truck. And no one’s really out right now because it’s an awkward time,” she said.

In another text that same day, she kept pushing.

“I thought you wanted to do this. The time is right and you’re ready . . . just do it babe,” she said.

Shortly after Roy died, Carter told a friend that she was talking to him on the phone when he killed himself.

“I helped ease him into it and told him it was okay . . . I could’ve easily stopped him or called the police but I didn’t,” she texted her friend.

Daniel Medwed, a law and criminal justice professor at Northeastern University, said Carter’s text messages arguably encouraged Roy. What prosecutors will have to prove this week is whether Carter’s encouragement resulted in his death.

“Prosecutors will have to prove that Carter causes Conrad Roy to kill himself and essentially caused his death,” Medwed told The Washington Post. “Defense lawyers are going to argue that he’s had suicidal tendencies predating their relationship. They’re going to emphasize that he was alone in his car, that ultimately it was his decision. . . .

“There may be an issue on the extent to which she was aware of the risk. She knew he was suicidal, but did she know that he was going to go through with it?”

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.

Medwed thinks the involuntary manslaughter charge is a stretch. Although assisted suicide through coercion is considered a crime in most states, Massachusetts is one of a few where it isn’t.

“Usually, manslaughter charges involve direct action by the defendant . . . some type of horrific unintentional killing where the behavior disregarded a risk, like firing a gun into a crowd,” Medwed said. “This is different.”

David Siegel, a professor at the New England School of Law, agreed that the case has broken ground.

“This defendant acted remotely only through communication, through text messages, and that’s different,” Siegel said. “What I think is going to be significant, at least in the facts of this case, is that this was repeated, lengthy electronic communications between two young people. The issue is going to be whether that series of communications between those people under those circumstances amount to wanton and reckless conduct.”

Carter’s and Roy’s ages and their relationship also would be critical, experts say, and Carter could argue that the text messages, although harrowing, are how teenagers communicate.

“We recognize that a lot of our conduct today is virtual,” Siegel said. “A lot of our virtual conduct today is electronic, and we recognize that there can be just as serious consequences from electronic or digital or virtual actions as from physical actions in the physical world.”

Carter waived her right to a jury trial Monday. A judge will hear her case and issue a verdict. Opening statements and testimonies will start Tuesday, said Gregg Miliote, spokesman for the Bristol County district attorney’s office. Carter’s attorney, Joseph Cataldo, didn’t return a call seeking comment.

Medwed said choosing a bench trial over a jury trial is a savvy move on the defense’s part.

“The idea is the judge has sort of seen it all and won’t be shaken by the facts and horrible details,” he said. “While jurors who are unaccustomed to the horrible nature of criminal activity, they could react emotionally to facts like these and hold it against her. A judge could be a little bit more dispassionate and objective in looking at the case.”

The Washington Post’s Lindsey Bever contributed to this report.