Some criminals plot and plan before they deliberately carry out heinous deeds, knowing full well that killing or maiming is wrong. For them, after a conviction, it's straight to a life behind bars for however long the sentence may be.

But what if the person committing the crime couldn't appreciate the nature of his or her actions or know that they were wrong because of a mental illness?

Looking back

The basic principle behind Section 16 of the Criminal Code of Canada dates back to a British ruling from 1800 in the case of James Hadfield. Hadfield had fired a gun at King George III and was found not guilty of attempted murder by reason of insanity. The chief justice, Lord Kenyon, felt that prison wasn't the place for Hadfield but also considered that it would be wrong to return him to the community.

Kenyon wrote:

"The prisoner, for his own sake, and for the sake of society at large, must not be discharged; for this is a case which concerns every man of every station, from the king upon the throne to the beggar at the gate; people of both sexes and of all ages may, in an unfortunate frantic hour, fall a sacrifice to this man, who is not under the guidance of sound reason; and therefore it is absolutely necessary for the safety of society that he should be properly disposed of, all mercy and humanity being shown to this most unfortunate creature.

"But for the sake of the community, undoubtedly, he must somehow or other be taken care of, with all the attention and all the relief that can be afforded him ... for the present, we can only remand him to the confinement he came from."

Hadfield was held in a psychiatric hospital for the rest of his life.

Sending the person to prison may not be justified, but sending the person right back into the community might not be safe either.

Enter Section 16 of the Criminal Code of Canada.

That section sets up provisions for the intricate relationship that has come to exist between mental illness and the criminal justice system.

It's a relationship that has evolved over time, in Canada and elsewhere.

No longer a reference to insanity

At one time, criminals could be found "not guilty by reason of insanity," but now, in Canadian court cases where mental illness is an issue, a person can be found not criminally responsible on account of a mental disorder.

That's not to say a person is acquitted.

But it does clear the way for treatment of the mental illness and an approach officials hope balances public safety with the goal of treating the offender with dignity.

A defence lawyer, a Crown lawyer or a judge can ask for a forensic psychiatric assessment if they think a mental illness could have affected an individual's actions when a crime was committed, according to the website of the Law and Mental Health Program at the Centre for Addiction and Mental Health in Toronto.

Those assessments by psychiatrists and other mental health professionals are considered by the court before it determines whether the individual is or is not criminally responsible.

That designation is made if it's determined a mental disorder made it impossible for the accused individual to appreciate the nature of the actions in question or know that those actions were wrong.

Charter violation

Changes to the Criminal Code passed by Parliament in 1992 altered the way the justice system handles such cases. The changes came after a Supreme Court decision found previous practices violated the Charter of Rights and Freedoms.

Those changes also led to the mandatory creation of review boards in each province that have jurisdiction over anyone found by a court to be unfit to stand trial or not criminally responsible on account of a mental disorder.

Before the 1992 changes, "provincial and territorial courts had no discretion but to automatically detain in 'strict custody' persons found 'not guilty by reason of insanity' or unfit to stand trial on what was known as a 'lieutenant governor's warrant,'" says the website of the Ontario Review Board.

The 1992 changes eliminated the reference to "not guilty by reason of insanity" and replaced it with "not criminally responsible." Automatic "strict custody" and the role of the lieutenant governor were eliminated.

"Instead, the court is now able to hold a disposition hearing immediately following the verdict and make its own disposition for the accused," says the website.

Growth of 10% per year

In Ontario, the review board can grant an absolute discharge, order a person to be detained in a hospital or grant a conditional discharge, allowing the person to live in the community subject to specific conditions.

Ontario currently has about 1,500 individuals under the jurisdiction of its review board. That figure includes those found unfit to stand trial and those found not criminally responsible.

The review board says that number has been growing at a rate of about 10 per cent per year, a pattern that "would appear to be disproportionate to provincial population growth as well as to increases in the general arrest rate."