A US teenager repeatedly urged her 18-year-old boyfriend to kill himself by text message, prosecutors said.

Michelle Carter, who was 17 at the time, pressured her boyfriend Conrad Roy III to commit suicide, helping him overcome his fears and research methods of committing suicide painlessly, as well as lying to police, family and friends about his whereabouts as he gassed himself in his vehicle in a Kmart supermarket in Fairhaven, Massachusetts, prosecutors alleged.

On 28 August prosecutors released text messages they claimed prove that she is guilty of involuntary manslaughter in Roy's death on 12 July, 2014.

"You're finally going to be happy in heaven. No more pain," she told him in one message. "It's okay to be scared and it's normal. I mean, you're about to die", reports the New York Daily News. "You just need to do it, Conrad," she texted him on the morning of 12 July, according to the indictment. "The more you push it off, the more it will eat at you. You're ready and prepared. All you have to do is turn the generator on and you will be free and happy. No more pushing it off. No more waiting."

The texts, dated 6-12 July, 2014 were revealed at a juvenile court hearing as prosecutors battled a motion by Carter's legal team to dismiss the indictment.

"You have everything you need," she wrote to him, and assured him his parents would move on from his death. "There is no way you can fail. Tonight is the night. It's now or never."

She discussed the best method of suicide with the teen, who had tried to take his own life before, and on 6 July discussed whether to siphon exhaust fumes into the back of his truck. "Yeah, it will work," Carter responded, according to the document. "If you emit 3200 ppm of it for five or ten minutes you die within a half hour. You lose consciousness with no pain. You just fall asleep and die."

The couple allegedly spoke twice in the hours leading to Roy's death, according to the indictment. She later texted a friend that she had told Roy to get back inside the car when it began to fill with carbon monoxide and he exited the vehicle.

Carter's lawyer, Joseph P Cataldo, claims that his client was "brainwashed" into taking part in Roy's suicide plans, and was receiving treatment for emotional and psychological problems. He said Carter had a right to freedom of speech. "It was his plan," Cataldo told the court. "He is someone who caused his own death. Michelle Carter's only role in this is words."

After Roy's death, Carter organised a memorial event for him, and claimed on Facebook and Twitter that she had tried to save his life.

The judge took Carter's defence's dismissal motion under advisement and scheduled the trial to start on 2 October.