NEW YORK, JUNE 10 -- The seven-week trial of subway gunman Bernhard H. Goetz began winding to a close today with his attorney arguing that evidence showed the 39-year-old engineer was surrounded by four youths and about to be robbed before he shot them.

In a five-hour summation, Barry I. Slotnick, the lawyer, said part of Goetz's taped confessions, during which Goetz said he had deliberately tried to "murder" the four youths, should be dismissed as a "post-traumatic statement, an unreliable statement."

Goetz confessed on New Year's Eve 1984 to the shootings nine days earlier. He was, Slotnick said, "the most unreliable source in the world" because he was "a traumatized, sick, psychologically upset individual."

After one of the youths asked him for $5, Slotnick argued, Goetz feared that he would be "beaten to a pulp." "The mind went off, the body went into automatic pilot . . . . People who are traumatized should not be convicted on the basis of their traumatization."

The case is expected to go to the jury of four women and eight men this week, after prosecutor Gregory Waples makes his final argument and the judge delivers instructions on New York's self-defense laws.

Hundreds of spectators lined up at the courthouse today in hopes of attending the trial. The case, which rocketed Goetz to international notoriety, became a symbol of the yearning for justice -- or revenge -- on the part of big-city crime victims.

The case also raised racial issues, since Goetz is white and the four victims -- Slotnick today called them a "wolf pack" -- are black. All of the victims had police records before the incident, but none had been convicted of a felony.

Despite the testimony of 44 witnesses, including subway passengers, police officers and medical experts, the trial left key issues unresolved, such as whether more than one youth approached Goetz, whether they were planning to rob him or merely panhandle, and whether Goetz fired a second shot at one of the youths whom he had already wounded.

In his confession, Goetz said he approached the youth, Darrell Cabey, as he was slumped on a subway seat and said, "You don't look so bad, here's another," then shot him again. Cabey's spine was severed, resulting in brain damage and partial paralysis.

Slotnick labeled that part of the confession "fantasy," noting that all but one witness had heard all the shots in "rapid succession" and had failed to see Goetz approach Cabey. Ballistics experts, he said, showed that Cabey was standing when he was shot.

Goetz, who in the months following the shooting shed his shyness for an outspoken self-righteousness, did not take the stand in his defense. His attorneys hired a bodyguard to shield him from reporters during the trial after his statements to the news media showed far less contrition than his initial confession.

Goetz is charged with 13 counts of attempted second-degree murder, assault, illegal weapons' possession and reckless endangerment.

Goetz carried a gun for self-defense, but did not intend to use it until he was "trapped" by "the gang of four," Slotnick said. "People do terrible things and strange things and they react. Bernhard Goetz reacted to fear. His act was appropriate.

"He didn't want to be beaten. There's no obligation by anybody to allow themselves to be robbed or beaten. There is no duty to retreat."