HALIFAX -- A mentally ill man who has admitted to murdering two Halifax men in 2007 believed he was a god-like figure on a mission to cleanse the world of sinners, a forensic psychiatrist told a court hearing Tuesday.

Glen Race, 32, pleaded guilty in September to first-degree murder in the death of Trevor Brewster and second-degree murder in Paul Michael Knott's death. However, Race's lawyer has filed an application to have his client declared not criminally responsible on the grounds he was too mentally ill to appreciate that what he was doing was morally wrong.

Dr. Lisa Ramshaw told a hearing in the Supreme Court of Nova Scotia that Race was motivated to kill by grandiose religious delusions and paranoia brought on by schizophrenia, a chronic mental illness.

"Mr. Race was unable to access the moral wrongfulness at the time due to the extent of his psychosis, which was driving his behaviour," Ramshaw said in a report submitted to the court. "A defence of not criminally responsible on account of a mental disorder is therefore supported."

Crown and defence lawyers agree that Race should be declared not criminally responsible, largely based on reports from three psychiatric experts, including Ramshaw, who have all come to the same conclusion. But it is up to Judge Kevin Coady to decide whether such a finding has legal merit.

Outside court, Crown attorney Paul Carver said the hearing is aimed at showing the public how someone who appears to be mentally stable and organized on the surface can in fact be motivated by delusions that impair their moral compass.

Ramshaw said she based her conclusion on a review of Race's extensive medical records, dating back to 2001, and 10 hours of interviews she conducted with Race in 2011.

Ramshaw said she learned of how Race's delusions prompted years of bizarre behaviour. Among other things, she found Race had refused to take a bath for an entire year, believed he was telepathic and could talk to trees and spirits.

However, she also determined that Race was highly intelligent and extremely guarded about his beliefs, which left him outwardly in control, even though his mind was a tumult of voices and extreme beliefs about demons and vampires.

"He believed he needed to carry out random killings to cleanse the world of these sinful people," said Ramshaw, a staff psychiatrist at the Centre for Addiction and Mental Health in Toronto.

She said even Race's parents, who had tried for years to get him psychiatric help, weren't aware of his level of psychosis in the weeks before the murders.

As well, she said his extensive medical file -- which included references to unsuccessful treatments in 2001, 2005 and 2006 -- made it clear that Race could not be faking mental illness to evade justice.

As for why Race killed Brewster and Knott in particular, Ramshaw said it appears he selected his victims based on the probability he could escape detection.

Court documents say both Knott and Brewster were gay men who frequented locations in the Halifax area that are known as spots to arrange sexual liaisons.

Knott was stabbed to death on May 1, 2007, in the front seat of his car while parked at the Citadel Hill historic site in downtown Halifax. Brewster was stabbed and bludgeoned six days later near Frenchman Lake, a secluded spot in an industrial park.

In both cases, Race hid the victim's body and later went to great lengths to hide their vehicles and flee to Mexico, suggesting a high level of organization.

Ramshaw stressed that even though Race understood the legal implications of what he was doing, his delusional belief system left him incapable of making sound moral choices.

"He believed that he was on a mission and this was going to cause some greater good," she testified.

Race was extradited to Canada to face the charges in Halifax after he was given a life sentence in the United States for killing a man near Mooers, N.Y., on May 10, 2007.