A Massachusetts woman accused of encouraging her boyfriend to kill himself before his suicide was found guilty of involuntary manslaughter Friday.

Michelle Carter faces up to 20 years in prison after her conviction in the death of 18-year-old Conrad Roy III — who died from carbon monoxide poisoning inside his pickup truck in July 2014.

Juvenile court Judge Lawrence Moniz said Carter was “mindful” of the toxic environment building in Roy’s pickup — yet encouraged the troubled teen to get back in the vehicle.

“She is mindful that the process in the truck will take approximately 15 minutes,” Moniz said during Friday’s hearing in Taunton.

Carter did that despite knowing “all of the feelings” Roy had shared with her previously, including a prior attempt to drown himself, Moniz said.

“Instructing Mr. Roy to get back in the truck constituted wanton and reckless conduct, creating a situation where there’s a high degree of likelihood that substantial harm would result,” Moniz said.

Carter — who spoke to Roy in a series of text messages and phone calls during his suicide bid — took no action to help Roy by calling either police or his family despite knowing of his plan and location, Moniz said.

“She did not issue a simple additional instruction: Get out of the truck,” he continued.

Moniz also banned Carter from contacting Roy’s relatives and ordered her not to obtain or apply for a passport. Carter is scheduled to be sentenced on Aug. 3.

Text messages between the two shown in court revealed that Carter, then 17, told Roy to “get back in” the vehicle as it filled with the lethal gas.

“You can’t think about it,” Carter allegedly texted Roy on the day of his death. “You just have to do it. You said you were gonna do it. Like I don’t get why you aren’t.”

Prosecutors also noted that Carter sent a text to a friend from high school about two months after Roy’s death, admitting she was to blame.

“It’s my fault,” Carter texted to classmate Samantha Boardman. “I could have stopped him but I told him to get back in the car.”

Carter also told Boardman she was worried about what investigators would find on Roy’s phone.

“I’m done,” Carter wrote in one message shown in court. “His family will hate me and I can go to jail.”