A woman on trial for encouraging her boyfriend to kill himself was delusional after becoming "involuntarily intoxicated" by antidepressants, a psychiatrist said in court on Monday.

Dr. Peter Breggin testified that Michelle Carter "was unable to form intent" after switching to a new prescription drug weeks before her boyfriend committed suicide, according to CNN.

Carter, 20, is on trial for involuntary manslaughter for the death of her 18-year-old boyfriend.

Carter, then 17, is accused of urging her boyfriend Conrad Roy III to kill himself over text messages. Roy was sitting in his pickup in July 2014, filling his truck with carbon monoxide, trying to kill himself. Having second thoughts, he left the truck, and Carter told him to ‘‘get back in.’’ Prosecutors have accused Carter of wanting the sympathy and attention that came with being the ‘‘grieving girlfriend.’’

Breggin, who testified for the defense, said that Carter had no nefarious intent and genuinely thought she was helping Roy. She had been on Prozac for years before switching to Celexa three months before Roy's death. Breggin testified that such drugs can impair judgment, wisdom, understanding, love and empathy especially in the adolescent brain.

"She was enmeshed in a delusion," Breggin testified. "She was unable to form intent because she was so grandiose."

Boston Globe reported that Breggin stated in court that Carter was vulnerable and troubled. He said that she was struggling with suicidal thoughts of her own after being prescribed Prozac.