TORONTO -- A Toronto judge has ordered a second mental health assessment for a man found guilty in a plot to derail a passenger train after concluding that an earlier psychiatric evaluation of the convicted terrorist had "serious flaws."

Justice Michael Code ordered a fresh 30-day assessment for Chiheb Esseghaier under Ontario's Mental Health Act on Friday, in what he has called a very complicated matter.

"The issue before me is not whether Esseghaier was fit at the time when his trial commenced or concluded," Code emphasized. "Rather the issue is whether he is fit now, at the time of sentencing."

The new assessment, which will be conducted by a Crown-chosen psychiatrist, will examine Esseghaier's mental state "both in relation to the issue of fitness at a sentencing hearing and in relation to any other relevant aspect of sentencing," Code said.

Esseghaier and his co-accused, Raed Jaser, were found guilty in March of a terror-related conspiracy to commit murder -- which carries a sentence of up to life in prison -- and six other terror-related charges between them. Their sentencing hearing is currently underway.

Esseghaier, who is self-represented, is deeply religious and has consistently maintained his desire to be judged under the Qur'an.

He has gone on rambling rants in the courtroom and even prayed in the prisoner's dock on one occasion, but his mental state only recently became an issue in the case, after the findings of Dr. Lisa Ramshaw were presented in court.

Ramshaw, who conducted the assessment at the request of a court-appointed lawyer assisting Esseghaier through the legal process, testified she believed he was unable to participate in his sentencing hearing because he is likely schizophrenic.

That diagnosis, which Esseghaier called a bunch of "lies," led Crown lawyers to demand another assessment be ordered -- an issue Code had to decide on.

In a 28-page decision, Code meticulously reviewed Esseghaier's conduct before, during and after his trial.

"It can be seen that Esseghaier made coherent and explainable decisions not to retain counsel, to represent himself at trial and to remain silent for the most part," Code said.

"In my view there is not a scintilla of evidence from the pretrial and trial record to suggest he was unfit to stand trial nor did anyone ever raise the matter at trial or suggest otherwise."

In light of Ramshaw's report, however, Code acknowledged that a "collateral issue" regarding Esseghaier's fitness had arisen.

Code said that Criminal Code provisions relating to fitness to stand trial didn't extend to sentencing proceedings, where someone has already been found guilty.

But he said a second assessment for Esseghaier could be ordered under provincial legislation.

Code noted that another important reason for ordering a new assessment was that he was not happy with Ramshaw's report.

"Dr. Ramshaw's report and testimony contained a number of serious flaws," he said.

"I am left with an unsatisfactory psychiatric assessment to which I can presently attach little or no weight. Accordingly, this is a proper case to allow the Crown to seek a further assessment by a different psychiatrist."

Esseghaier, however, made it clear that he would not co-operate with the doctor conducting the new assessment unless Ramshaw withdrew her report, or the court removed her assessment from his file.

"This report of Ramshaw, it's wrongful and false. It's lying," Esseghaier told Code. "You know very well that I am very healthy in terms of mental and in terms of psychology."

During Jaser and Esseghaier's trial, court heard that an undercover FBI agent gained the men's trust and surreptitiously recorded their conversations, which made up the bulk of the evidence in the case.

The two were recorded speaking about alleged terror plots they would conduct in retaliation for Canada's military actions in Muslim countries, including the derailment of a Via Rail train travelling between New York and Toronto.