Beset with psychiatric problems, the Canadian teen-ager pointed the barrel of a .22 rifle at the roof of his mouth and pulled the trigger.

The shot failed to kill him but, by a bizarre happenstance, served as inadvertent brain surgery, according to the psychiatrist who was treating him.

The bullet that tore into his brain released the 18-year-old from the grip of his most disturbing psychiatric problem. Until the day he attempted suicide, he had a fierce compulsion that led him to wash his hands more than 50 times a day and take frequent, sometimes hours-long showers.

The patient, identified as "George," was so absorbed in his compulsion that he had to drop out of school and was unable to hold a job, according to Dr. Leslie Solyom, his psychiatrist, who described the case in the British Journal of Psychiatry.

When the bullet was removed from his brain and he reentered therapy, George was largely free of his compulsion, Solyom found. The psychiatrist also discovered that George's IQ had risen back to the level of the days before the illness, when he had been an A student.

The bullet went through the roof of his mouth and entered the left front lobe of his brain. It lodged in the pre-motor cortex, a structure that has connections through to the basal ganglia atop the base of the brain where muscle activity in the body is coordinated.

"It is an extraordinary case, a one-in-a-million shot," said Dr. H. Thomas Ballantine, a neurosurgeon at the Massachusetts General Hospital in Boston who has performed psychiatric surgery on many people with extreme mental disorders. George's disorder is believed to be linked to only the left side of the brain's front lobe and to the connections from there to the motor areas deep in the brain.

The bullet cut through some of the areas that connect to the basal ganglia, Ballantine said, explaining that it crudely mimicked the action of surgeons.

In extreme cases of obsessive-compulsive disorder, the connections are surgically severed after other forms of therapy fail, Ballantine said. There are 10 to 30 such surgeries per year in the United States and many more in Britain, he said.

Patients with an obsessive-compulsive disorder like George's are not psychotic, but are painfully aware that their behavior is irrational. But they feel impelled to carry out repetitive actions such as washing, checking to see whether doors are closed and stoves turned off, and counting objects repeatedly.

The two sides of the illness are obsessions -- recurrent, unpleasant thoughts or impulses -- and compulsions -- repetitive behavior performed in the same manner seemingly endlessly.

"Parents of obsessive-compulsives, particularly mothers, often have cruel streaks," Solyom, who works at the Shaugnessy Hospital in Vancouver, told the Los Angeles Times.

George's mother told him, "So, look George, if your life is so wretched just go and shoot yourself," according to Solyom. George went to the basement and did just that.

Obsessive-compulsive disorder is among the most common of psychiatric disorders, affecting one percent to 2 percent of adults and 0.5 percent of children, a total of 2 million to 4 million Americans.

"It is unfortunate if the young man didn't know about the new experimental drug therapy which is doing so well now," said Dr. Henrietta Leonard, a child psychiatrist at the National Institutes of Mental Health. Though not yet approved for treatment in this country, a new antidepressant, Clomipramine, has substantially improved patients' condition in about 75 percent of cases, Leonard said.

Although George's depression did not disappear and he is still on medication, the bullet's action has enabled him to resume a normal life and go on to college.