BOSTON — A Massachusetts woman was sentenced to 2-1/2 years in prison on Thursday for goading her teenage boyfriend into suicide with a series of text messages in 2014, substantially less time than prosecutors had sought.

Michelle Carter, 20, was found guilty in June of involuntary manslaughter for urging her 18-year-old boyfriend, Conrad Roy, to kill himself in a parking lot about 60 miles south of Boston.

The verdict, which marked the first time in the state a person had been found guilty of manslaughter only for words, was handed down by Bristol County Juvenile Court Judge Lawrence Moniz after Carter opted against a jury trial.

The trial highlighted the dangers of cyber bullying and raised concerns among civil liberties advocates who argued that prosecutors and the judge overreached by finding Carter guilty for her speech.

Moniz said he weighed Carter’s age at the time of the crime, when she was three weeks shy of her 18th birthday, in deciding her sentence.

“I have not found that Ms. Carter’s age or level of maturity or even her mental illness have any significant impact on her actions,” Moniz said. “She was mindful of the actions for which she now stands convicted.”

Moniz said the first 15 months of Carter’s sentence would be served in prison, with the balance suspended. He agreed to a defense request to allow Carter to remain out of prison until her appeal options in state courts were exhausted.

Prosecutors had asked for a sentence of seven to 12 years in prison, while defense attorneys sought five years’ probation.

Before her sentence was handed down, Roy’s father, also named Conrad Roy, told the court that he believed Carter, of Plainville, had exploited his son.

“Michelle Carter exploited my son’s weakness and used him as a pawn in her own well being,” Roy said. “How could Michelle Carter behave so viciously and encourage my son to end his life? Maybe it was her inhumanity.”

Moniz focused on messages she sent to Roy as he sat in his parked truck in Fairhaven, Massachusetts, as it filled with carbon monoxide from a generator he had hooked up to it. Roy, of Mattapoisett, briefly left the vehicle after he began to be overwhelmed by the fumes but returned after Carter urged him to “get back in.”

Roy had previously attempted suicide and Carter had taken psychiatric medication, according to trial testimony.