NEW YORK, JUNE 16 -- A Manhattan jury convicted Bernhard H. Goetz of illegal gun possession but cleared him of assault and attempted-murder charges in the shooting of four black youths in a subway car 2 1/2 years ago.

In a packed courtroom, hundreds of spectators let out what sounded like a single gasp of astonishment when jury foreman James Hurley spoke the words "Not guilty." Goetz, in blue jeans and an open-necked white shirt, stood as he listened to each of the 13 verdicts, his head bowed and a blank expression on his face.

The four-woman, eight-man jury, which included two blacks, had deliberated for four days. Six of the jurors had been victims of crimes, three of them in a subway.

The gun charge carries a maximum penalty of 2 1/3 to 7 years in prison, but first offenders generally do not receive jail terms. Goetz was acquitted of three counts of weapons possession, four of attempted murder, four of first-degree assault and one of reckless endangerment -- charges that could have put him in prison for 50 years.

Supreme Court Judge Stephen Crane set sentencing for Sept. 4 and allowed Goetz to remain free on $50,000 bond.

Goetz, a lean, intense, soft-spoken electronics engineer who was injured in a 1981 mugging, confessed that he shot the youths after two of them approached him and one, Troy Canty, asked for $5. He said he feared, because of the "shine" in Canty's eyes and the way he smiled, that the youths were going to beat him up.

In the confession, videotaped by New Hampshire police when Goetz surrendered there, Goetz called himself "a cold-blooded murderer" and acknowledged that he had fired a second time, point-blank, at one of the youths. That bullet left Darrell Cabey, then 19, brain-damaged and partly paralyzed.

The shootings, which raised basic issues about the limits of self-defense, became one of the most celebrated criminal cases in the city's history. Outside the courthouse today, more than 200 reporters, cameramen and photographers staked out four entrances waiting for Goetz and the jurors to emerge. Knots of citizens gathered, arguing about the verdict.

A dozen Guardian Angels in red berets, all Goetz supporters, milled around Revolutionary Communist Party demonstrators who marched in a circle shouting, "Hey, Bernie, have you heard? This is not Johannesburg!"

More than an hour after the verdict, 10 court officers burst out of a side door in a flying wedge with Goetz in the middle. As cameramen jostled passers-by, Goetz got into a dark-windowed limousine that sped away, horn honking.

Hailing the verdict as "proper and appropriate," Goetz's attorney, Barry I. Slotnick, said that his client "would like to thank the public for its support . . . . Mr. Goetz would like to go back to being an anonymous stranger in the city of New York. All he wants to do now is fade into the woodwork . . . ."

Shirly Cabey, mother of the paralyzed youth, said the verdict "gives a license to people who want to shoot black youths."

Mayor Edward I. Koch said, "There may be some who misperceive the case, that might engage in vigilantism" but warned that any vigilantes would be prosecuted.

Jurors said none of them favored convicting him of attempted murder. They said discussions were between those in favor of acquittal and those who had doubts.

Mark Moseley, a technical salesman, said the fifth shot was "a sticky situation" for jurors, but they doubted it occurred. He said bullet holes in the youth's jacket indicated he was shot in the side rather than point-blank, and many witness heard all the shots in "rapid succession" without a pause.

The race issue was not raised in deliberations, jurors said. "It didn't matter if he was a white man or a black man," Moseley said. Juror Michael Axelrod, a telephone technician, said, "Crime doesn't know a color."

Goetz, Axelrod said, "didn't get on the train looking to murder anyone. . . .He responded to a threat."

The jurors, Axelrod added, "live in New York. I ride the train every day. We know what the confines of the subway cars are. We felt that Mr. Goetz had no chance to retreat in that situation."

Since the day of the shootings, Dec. 22, 1984, the case attracted extraordinary publicity. Tabloids hailed Goetz as "The Subway Avenger" and the "Death Wish Vigilante" after a movie character played by Charles Bronson. "Give Him a Medal" trumpeted one Daily News headline.

When he surrendered in Concord, N.H., on New Year's Eve, nine days later, T-shirts labeled "Bernie Goetz Me Off" sold on city streets. Opinion polls ran heavily in his favor. Talk shows were flooded with calls from revenge-minded mugging victims. Politicians, including several U.S. senators and Mayor Koch, issued statements on the case.

During the trial, pro- and anti-Goetz demonstrators marched in front of the courthouse. Hundreds of spectators lined up each day for a chance to hear some of the 44 witnesses, including subway passengers, policemen and medical and ballistics experts.

The racial aspect of the case outraged many blacks, who contended Goetz never would have shot the youths had they been white. Other blacks, many of them crime victims, agreed with Andrea Reid, a black passenger in Goetz's subway car, who testified that her reaction was, "Those four got what they deserved."

The first grand jury to consider the case declined to indict Goetz for attempted murder, charging him only with alleged gun possession. A second grand jury, convened after public outcry to consider what District Attorney Robert M. Morgenthau described as new evidence, returned indictments for attempted murder and first-degree assault.

Attempted murder charges were dropped by a Supreme Court judge who ruled that the grand jury had not received proper instruction but later reinstated by New York's highest court. The Supreme Court is the state's trial-level tribunal.

All four of Goetz's victims had police records and one, James Ramseur, is serving a prison sentence for a rape committed several months after the shootings. Two of the youths later acknowledged that they were cocaine addicts. One, Canty, testified that the four were on their way downtown from their South Bronx housing projects to steal money from video machines using screwdrivers. He said they did not plan to rob Goetz but were merely panhandling.

Defense lawyer Slotnick called the youths "savages" and "a wolf pack" that preyed on harmless citizens. Ramseur reinforced the image before the jury by angrily refusing to testify. He changed his mind but lost his temper under Slotnick's taunting cross-examination and was held in contempt of court.

In his confession and in public statements later, Goetz, a New York University graduate in nuclear engineering, portrayed himself as a symbol of a citizen's right to self-defense. His 1981 assailants, he noted, went unpunished.

In his confession, Goetz called himself "a vicious rat," "a monster . . . . A person has to be reduced to this kind of animal to survive in the city," he said, adding, "You can drag me through the dirt. I don't care. But there is a bigger issue, and that is the government of New York City is a disgrace . . . . The crime system is a disaster."

New York University Law Prof. George Fletcher, who attended the trial daily and is writing a book about it, said after the verdict, "The jury identified and sympathized with Goetz's fear. It is not a judgment about whether these kids deserved to be shot."

During seven weeks of testimony, the trial came to focus sharply on Goetz's state of mind -- his motives and his mental health.

"He's anything but the typical New Yorker," prosecutor Waples argued to the jury. "Inside this man lurks a dark spirit, something deeply suspicious, intellectually rigid, seething with self-righteous anger and obsessed with crime and his own solutions."

Goetz, who carried a loaded gun after his 1981 mugging, was "an emotional powder keg," Waples said. "All he needed was one spark to set him off."

Goetz did not take the witness stand. But in four chilling hours of videotape -- the key evidence for the prosecution and the defense -- he told police, "My intention was to murder them, to hurt them, to make them suffer as much as possible . . . . If I had more bullets, I would have shot them all again and again. My problem was I ran out of bullets, and I was gonna gouge one of the guys' eyes out with my keys afterwards."

After firing four shots, Goetz checked each youth and, finding the last one, Cabey, slumped on the seat, he said he approached him and shot him again saying, "You seem to be all right. Here's another."

That fifth shot was a "sadistic, cold-blooded attempted execution," Waples said. Although one subway passenger testified that he saw Goetz fire point-blank at the youth, Slotnick argued the shot was "a fantasy" of the traumatized Goetz.

In instructing the jury on self-defense laws, Judge Crane said each shot must be considered on the basis of what a "hypothetical, reasonable man" would do.

But Crane said the jury could consider the testimony of psychiatrist Bernard Yudowitz, who said in moments of extreme fear the mind can turn off and leave the body on "automatic pilot." In his confession, Goetz had warned, "Don't go passing statements of morality . . . . What happened here is I snapped . . . . People are looking for a hero or they're looking for a villain and neither is, nothing is the truth." Special correspondent Marianne Yen contributed to this report.