TORONTO -- Luka Magnotta, accused of killing and dismembering a Chinese student, was treated for paranoid schizophrenia, though his psychiatrist said he didn't always take his medication.

A letter from a psychiatrist who saw Magnotta, 30, is attached to the court file on a 2005 conviction for fraud and references the diagnosis of the "major psychiatric disorder."

The letter was released today after several media outlets fought for it to be made public.

The doctor at the Rouge Valley Health System in Toronto says Magnotta suffered from paranoid schizophrenia since at least 2000 and had been hospitalized several times.

The psychiatrist writes that Magnotta, then known by his birth name Eric Newman, was on anti-psychotic medications but didn't always take them, which the doctor said could lead to paranoia, auditory hallucinations and fear of the unknown.

A preliminary hearing for Magnotta, is underway in Montreal, where he faces several criminal charges, including first-degree murder, in the gruesome slaying and dismemberment last year of 33-year-old university student Jun Lin.

The newly released letter was attached to Magnotta's fraud court file at his sentencing, when the judge handed him a conditional sentence for fraud. After reading the letter she warned that Magnotta would always need to take medication, and if he didn't, she predicted his life "is going to get messed up."

A Globe and Mail reporter tried to obtain the letter, a public document, but was rebuffed in several attempts. Media outlets then hired counsel to make arguments to a judge for the letter's release.

Magnotta's lawyer Luc Leclair tried to stop the letter from becoming public, but Ontario Court Judge Fergus O'Donnell ruled Wednesday afternoon that it should be released.

It does contain sensitive and personal medical information, O'Donnell said in his ruling, but any privacy interest was foregone when the letter was filed in open court.

"Without access to the letter, the public is not in a position to engage in a meaningful assessment or debate over the appropriateness of what happened to Mr. Newman in 2005 in what is supposed to be an open and transparent court process," O'Donnell wrote.