Nearly three years ago, Mattapoisett teenager Conrad Roy took his life, following a series of text messages in which his girlfriend Michelle Carter encouraged him to kill himself.

And in less than a week, Carter will go on trial for involuntary manslaughter -- a charge that prosecutors say fits her lengthy campaign to pressure Roy into suicide, and which Carter's defense team argues is an overreach that would criminalize legal speech between a troubled boy and a teenage girl ill-equipped to help him.

The trial will begin at Taunton District Court with jury selection on June 5, and the sensational nature of the case and thorny legal questions it poses have attracted national media attention. The Washington Post, CNN and New York Magazine have all covered the case, and an HBO documentary team was present at a pre-trial media briefing on Tuesday.

Both Carter and Roy were teenagers when Roy died. Carter was charged as a "youthful offender," a category that allows for more severe sentencing than a typical juvenile charge.

Carter was charged with involuntary manslaughter in February of 2015. In September Taunton Juvenile Court Judge Bettina Borders rejected Cataldo's motion to dismiss the charge, allowing the case to move forward. Free speech, Borders ruled, does not extend to encouraging suicide.

Cataldo then filed an appeal to a single justice of the state Supreme Judicial Court and the district attorney's office filed a response in November. The full court announced it would hear the case and later ruled that the charges were proper and the case can proceed.

In the defense's appeal brief, Carter's attorneys wrote that prosecutors had overcharged Carter to compensate for a lack of applicable law against encouraging suicide in Massachusetts.

"Charging her with manslaughter was a transparent effort calculated to circumvent the fact that the legislature has not criminalized words that encourage suicide," the brief argued.

Her defense team has also argued that the suicide was largely Roy's plan, citing his history of mental illness and previous suicide attempt.

Prosecutors allege that Carter led a campaign of encouragement that directly led to the death of Roy, who had graduated from Old Rochester Regional High School that June.

"Carter assisted Conrad's suicide by counseling him to overcome his doubts," the indictment reads. "Her counsel took the form of positive direction, where she told him he was 'strong' enough to execute the suicide plan and would be happy once he was dead."

The text messages included in court filings show Carter, in between professions of love, advocating for suicide as Roy's best option after an extended period of depression.

"It's painless and quick," she wrote in one text. "Everyone will be sad for a while but they will get over it and move on," she wrote in another. She urged him not to delay the act, and advised him to find alternative methods of producing carbon monoxide when it became clear his truck's diesel engine would not work.

She also allegedly cajoled him back into the truck over the phone after he had second thoughts in the middle of the act, the prosecution said.

The prosecution has portrayed Carter as an active participant in Roy's death -- one who, after the fact, pretended to have no knowledge of the plan. She texted with Roy's relatives, asking where he was in the hours before his body was found in the Kmart parking lot.