A Massachusetts woman convicted of involuntary manslaughter because of text messages that cajoled her 18-year-old friend to commit suicide was sentenced Thursday to serve 15 months in jail.

Michelle Carter, now 20, faced a maximum 20-year prison term. Her unusual prosecution was closely watched, and it occurred in a state that has no law forbidding people from encouraging suicide. But the authorities—including a Bristol County judge—concluded that in 2014 Carter sent Conrad Roy text messages that wantonly and recklessly caused him to poison himself in a car with carbon monoxide. She was 17 years old at the time.

Judge Lawrence Moniz, who presided over the week-long, non-jury trial in June, issued the sentence in a packed courtroom in Taunton Trial Court, where Carter was tried as a juvenile. Noting that the prosecution was novel, Moniz stayed enforcement of any jail time until Carter exhausts her appeals in state court.

Overall, Moniz issued a 2.5-year term but said the defendant should serve only 15 months at the Bristol County House of Correction. He suspended the remainder of the entire sentence.

"This is an issue worthy of presentation to the appellate court," the judge said from the bench. "I don't know what the appeals court will do."

Moniz, who said he balanced rehabilitation and punishment when formulating his sentence, called the case "a tragedy for two families."

Defense attorneys maintained that the text messages were protected speech under the First Amendment and that the boy had planned to commit suicide regardless of Carter's cajoling. However, the state's top court had previously ruled against her, paving the way for the trial in which thousands of text messages and other communications between the two were admitted as evidence.

"You're finally going to be happy in heaven," one text read. Another said, "All you have to do is turn on the generator and you will be free and happy."

The state's top court last year upheld the indictment for involuntary manslaughter on "the basis of words alone" and that Carter was "virtually present" at Roy's suicide.

The boy, who had been battling depression and had attempted suicide in 2012, was found dead in a parking lot about an hour's drive south of Boston. Carter was also on the phone with Roy while he was killing himself. She urged him to get back in the vehicle when he hesitated, according to testimony.

Prosecutors sought a prison term of between seven and 12 years. Prosecutor Maryclare Flynn said Carter's "well thought out campaign" was for her "own personal gain and quest for attention." Defense attorney Joe Cataldo said Carter had an eating disorder and was on antidepressants. He argued for probation and no jail time. "She was going through some significant mental health issues herself," he told the judge during the hearing.

Involuntary manslaughter in Massachusetts amounts to causing a death by behavior that has a likelihood of causing harm.

The boy's father, also named Conrad Roy, told the court during the sentencing hearing that his son "was his best friend."

"How could Michelle Carter behave so viciously and encourage my son to end his life?" he asked from the witness stand as he tried to choke back tears.

Carter's father, David, urged for leniency and no jail time. "She will forever live with what she has done and I know will be a better person because of it," he wrote in a letter to the judge. "I ask of you to invoke leniency in your decision-making process for my loving child Michelle."