(CNN) Michelle Carter, whose own words helped seal her involuntary manslaughter conviction in the suicide of her teenage boyfriend, was sentenced to 15 months in a Massachusetts jail Thursday -- but will remain free pending appeals.

"This court must and has balanced between rehabilitation, the promise that rehabilitation would work and a punishment for the actions that have occurred," said Bristol County Juvenile Court Judge Lawrence Moniz, emphasizing rehabilitation as a primary component of juvenile justice.

Hundreds of Carter's text messages presented as evidence over six days of testimony in June convinced Moniz of her guilt in a criminal case that hinged largely on intimate cellphone exchanges between Carter and 18-year-old Conrad Roy III. Moniz sentenced Carter to a two-and-a-half-year term -- with 15 months in jail and the balance suspended plus a period of supervised probation.

Moniz granted a defense motion to stay the sentence, meaning she will remain free pending her appeals in Massachusetts.

Before imposing his sentence, the judge heard impassioned statements from relatives of Roy -- a troubled young man who struggled with mental health issues and had attempted to take his life before his 2014 suicide.

Camdyn Roy broke down on the stand as she spoke of waking up and going to bed each day thinking of her brother. She lamented not being able to attend his wedding or to be an aunt to his children.

Conrad Roy Jr. told the court that Carter "exploited my son's weaknesses and used him as a pawn" for her own interests.

And Lynn Roy, in a statement read by a prosecutor, said she prays that her son's death "will save lives some day," voicing her support for a state law making it a crime to coerce or encourage suicide. "There is not one day that I do not mourn the loss of my beloved son," she said.

Carter appeared to be close to tears as she listened, holding a tissue near her mouth.

Bristol Assistant District Attorney Maryclare Flynn recommended a sentence of seven to 12 years in jail, saying Carter "undertook a deliberate, well thought out campaign ... for her own personal gain and quest for attention."

Michelle Carter reacts as judge explains his his guilty finding in the June manslaughter case.

Defense attorney calls for probation

Carter faced up to 20 years behind bars -- but defense attorney Joe Cataldo asked for five years of supervised probation with required mental health counseling. He said his client had been diagnosed with several eating disorders, had been taking anti-depressants and was not a danger to the public.

The case involved two young people struggling with mental issues, Cataldo said. "This was so unique -- these two sad individuals," he said.

Cataldo added, "The goal is not punitive but rehabilitative."

Daniel Medwed, a professor of law and criminal justice Northeastern University, said the judge agreed in the end.

"By sentencing her to prison time, (the judge) signaled that this behavior is abhorrent and will not be tolerated," Medwed said.

"But by displaying mercy in terms of the relatively short duration of the sentence, I think he was trying to remain true to the goals of our juvenile system -- which is not to lock them up and throw away the key but to impose punishment with an eye toward helping the defendant undergo self improvement and ideally lead a productive life."

Case could spur passage of new law

The case could spur the Massachusetts legislature to pass a law that makes it a crime to engage in "coercing or encouraging suicide," Medwed said. Such a law already exist in about 40 other states.

Roy, 18, poisoned himself by inhaling carbon monoxide in his pickup truck.

In a 15-minute explanation of his guilty finding last June, Moniz focused on the defendant's extensive text messages.

"She admits in ... texts that she did nothing: She did not call the police or Mr. Roy's family" after hearing his last breaths during a phone call, Moniz said as Carter cried silently.

"And, finally, she did not issue a simple additional instruction: Get out of the truck."

JUST WATCHED Did teen's texts encourage boyfriend to commit suicide? Replay More Videos ... MUST WATCH Did teen's texts encourage boyfriend to commit suicide? 02:30

The state argued that the evidence was damning. Carter sent Roy numerous text messages urging him to commit suicide, listened over the phone as he suffocated -- and failed to alert authorities or his family that he'd died.

"This court has found that Carter's actions and failure to act where it was her self-created duty to Roy since she put him in that toxic environment constituted reckless conduct," the judge said. "The court finds that the conduct caused the death of Mr. Roy."

One July 2012 exchange of texts messages was typical:

Roy: "I'm overthinking"

Carter: "I thought you wanted to do this. The time is right and you're ready, you just need to do it! You can't keep living this way. You just need to do it like you did last time and not think about it and just do it babe. You can't keep doing this every day."

Conrad Roy III

Roy's relatives, who sat near Carter in the front row of the courtroom, wept as the judge ticked through the steps Roy took to end his life, as well as Carter's complicity. Sitting opposite them, Carter's family members also sobbed.

Prosecutor Katie Rayburn said after there were "no winners" in the case, which concluded with two families torn apart, emotionally drained and affected for years.

Roy aspired to be a tugboat captain and would be alive if not for Carter's actions, Rayburn told reporters. He had been trying to better himself, and "we all wish he had the opportunity" to grow up, she said.

Texts drove suicide, prosecutors argued

During closing arguments, prosecutors said Carter berated her vulnerable boyfriend when he had second thoughts about killing himself, listened by phone as he died and used his suicide to get from friends the attention that she desperately craved.

Carter went from offering "words of kindness and love" to aggressively encouraging Roy via text message to carry out longtime threats to commit suicide, Rayburn told the court.

"It got to the point that he was apologizing to her, ... apologizing to her for not being dead yet," she said in her closing.

Roy's body was found July 13, 2014, a day after his suicide in his parked truck in a Kmart parking lot in Fairhaven, nearly 40 miles from his home.