The Massachusetts Supreme Judicial Court has upheld the involuntary manslaughter conviction of a Plainville woman after she encouraged her boyfriend to kill himself in dozens of text messages and told him to "get back in" a truck filled with toxic gas.

Michelle Carter, 22, was convicted in the 2014 death of 18-year-old Conrad Roy III, who died by suicide after Carter encouraged him to end his own life. Carter was sentenced to 15 months in jail but has remained free as she pursued her appeal.

"The evidence against the defendant proved that, by her wanton or reckless conduct, she caused the victim's death by suicide," the 33-page ruling reads. "Her conviction of involuntary manslaughter as a youthful offender is not legally or constitutionally infirm. The judgment is therefore affirmed."

A judge had concluded Carter caused Roy’s death after she told him to get into his truck as it was filling with carbon monoxide. The then-17-year-old Carter texted her long-distance boyfriend: "You keep pushing it off and say you’ll do it but u never do. It’s always gonna be that way if u don’t take action."

"And then after she convinced him to get back into the carbon monoxide filled truck, she did absolutely nothing to help him: she did not call for help or tell him to get out of the truck as she listened to him choke and die," Justice Scott Kafker wrote in Wednesday's Supreme Judicial Court ruling.

Roy's grandmother, Janice, told NBC10 Boston she is happy with the outcome.

"It feels like there is closure," she said.

The Bristol County District Attorney's Office said its next step will be to file a motion with the trial court to revoke the stay of sentence and have Carter's sentence imposed. That motion will be filed in the coming days.

Carter's lawyers said they are disappointed in the ruling and may appeal the case to the U.S. Supreme Court.

"Today's decision stretches the law to assign blame for a tragedy that was not a crime," the law firm of Fick & Marx said in a statement. "It has very troubling implications, for free speech, due process, and the exercise of prosecutorial discretion, that should concern us all."

Matt Segal, legal director at the ACLU of Massachusetts, echoed those sentiments in a statement issued Wednesday afternoon.

The trial drew national attention and was closely watched on social media, in part because of the insistent tone of Carter's text messages.

In dozens of text messages, Carter urged Roy to follow through on his talk of taking his own life. "The time is right and you are ready ... just do it babe," Carter wrote in a text the day he killed himself.

"You can't think about it. You just have to do it. You said you were gonna do it. Like I don't get why you aren't," Carter wrote in another text.

Roy's father, Conrad Roy Sr., said Carter "exploited my son's weaknesses and used him as a pawn ... She has not shown any remorse."

Carter’s attorneys argued that she made bad choices in her communication with Roy during his final hours, but did not commit any crimes.

They said Roy was determined to kill himself and nothing Carter did could change that. They said Carter initially tried to talk Roy out of it and urged him to get professional help, but eventually went along with his plan.

They also said Carter was struggling with mental health issues of her own — bulimia, anorexia and depression — during the time she urged Roy to kill himself.

"We can all see from the text messages that Michelle Carter did not force Conrad Roy to kill himself," attorney Daniel Marx told the court in October.

Carter and Roy met in Florida in 2012 while both were on vacation with their families. After that, they only met in person a handful of times. Their relationship consisted mainly of texting. Both teens struggled with depression. Carter had also been treated for anorexia, and Roy had made earlier suicide attempts.

If you are in crisis, call the National Suicide Prevention Lifeline at 800-273-8255 or reach out to the Crisis Text Line by texting 'Home' to 741741.