Now that David Berkowitz is in custody, the emphasis has shifted from a concern about police competence to one about mental competence.

"Son of Sam" was feared as a "mad killer" a few short weeks ago. Now there is a widespread fear that the man who is alleged to be Son of Sam will be let off precisely because he may be "crazy."

Indeed, there are many who look ahead to the next few months as another trial of the laws governing sanity. It looks like we'll be hearing a great deal more about the legal interpretations of insanity than the psychiatric ones, as this case is heard in the courts, not on the couches.

It is likely that Berkowitz will go through two tests of "sanity." The first, to decide his competency to stand trial, has already begun. In Queens two weeks ago, one report declared him "unfit." But another is due on Oct. 6, and it is expected by legal experts that Berkowitz will stand trial sooner or later. As Dr. Allan Stone, a psychiatrist and Harvard Law School professor, said convincingly: "There is no way, given the new constitutional law, that he won't come to trial. It's just a matter of when."

When that occurs, Berkowitz will face a second test. In court, his defense attorneys will almost certainly plead him innocent by virtue of insanity. Then the jury will have to decide whether he is "criminally responsible" for six homicides and eight attempted homicides.

But jurors today face a set of problems different from those at any other time in legal history.

The case law on insanity pleas dates from 1844, when a man named M'Naghten tried to kill British Prime Minister Robert Peel and ended up killing his secretary. M'Naghten was convinced that Peel was persecuting him, and the jury was convinced that M'Naghten was insane. He was judged innocent and committed to a mental hospital where he lived the rest of his life.

"In the past, if someone was found not guilty by reason of insanity," Dr. Stone says, "society was protected because [he was] going to be confined forever. The legal decision that someone was mentally ill didn't cost the public anything in terms of safety."

This isn't necessarily true now. In the last several years, the law on civil commitment to mental institutions has changed, largely because of its abuse. Today, people aren't "put away" forever. If M'Naghten were committed in 1977, his case would inevitably come up for review. At some point in the future, he might even possibly be released.

This reality puts a jury in a new kind of straitjacket. After all, an insanity plea is generally heard in cases - like the Jack Ruby or Sirhan Sirhan trials - when the big question isn't "who dunnit" but "why." Under these circumstances, it has always been tough to win a verdict of "not guilty" on account of insanity.

In fact, there have been very few successful insanity pleas. Stone was asked by the American Bar Association to study them, and says: "I found so few I couldn't do the study. In New York state, there are fewer than half a dozen over a 10-year period. As a colleague said, the successful insanity plea in New York is somewhat less common than poisonous snakebites."

But with the additional fear now, shared by the public, that a "crazy man" could be let out to ride again, it will be even more difficult to arrive at an insanity verdict.

It seems far more likely that we will be convicting raving maniacs who believe that dogs are commanding their actions, than entertain the slightest chance that they will be let out.

The insanity plea has never been much more than a loophole in a legal system based on the notion of free will.

As Stone put it: "The legal system assumes that everyone has free will and chooses to do good or bad. If they do bad, it says, we will punish them. Then, occasionally we are confronted with someone who does something so bizarre that we say they couldn't possibly have freely chosen to do that. Insanity becomes the exception that proves the rule. We can go on assuming that everyone else is possessed of free will, except, of course, some people - a group of the insane."

The question at any given time is how large a group of exceptions society will tolerate. We only make them one by one, weighing the evidence, the consequences, and feeling the social climate. Right now, the question is whether we will make room in that group for a David Berkowitz.