NEW BEDFORD, Mass. (AP) — An 18-year-old Massachusetts woman who encouraged her boyfriend to kill himself can face an involuntary manslaughter charge, a juvenile court judge ruled.

Michelle Carter, of Plainville, sent 18-year-old Conrad Roy III, of Mattapoisett, dozens of text messages in 2014 encouraging him to take his own life.

Roy’s body was found in his pickup in Fairhaven on July 13, 2014. He died of carbon monoxide poisoning and police found a gasoline-operated water pump in the back seat.

On Tuesday, Judge Bettina Borders denied a defense motion to dismiss the involuntary manslaughter charge.

Carter’s lawyer, Joseph Cataldo, has said that earlier text messages show that Carter tried repeatedly to get Roy to seek help. The defense believes she isn’t responsible for the death, and Cataldo said he plans to appeal the decision.

In her ruling, Borders cited records that prosecutors say show Carter, then 17, was on the phone with Roy for about 45 minutes while he was inhaling carbon monoxide, heard him moaning and did not call 911. She also cited text messages Carter sent in which she said she told Roy to get back in his truck when he became afraid.

“The grand jury could find probable cause that her failure to act within the 45 minutes, as well as her instruction to the victim to get back into the truck after he got out of the truck, caused the victim’s death,” the judge wrote.

A spokesman for the district attorney’s office said they were pleased with the New Bedford judge’s ruling and they can now focus on the upcoming trial. No trial date has been set yet.

A pretrial hearing is scheduled for Nov. 30 in Taunton Juvenile Court.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.