A Vietnam veteran who pleaded guilty to holding eight people hostage in a Silver Spring bank in 1977 was released on probation yesterday after a judge ruled that the delayed psychological trauma of the war led to the veteran's actions.

As a condition of probation, he was ordered to receive therapy at a Veterans Administration hospital in Piney Point, Md.

Montgomery County Circuit Court Judge John Mitchell rejected prosecution requests that Stephen W. Gregory be imprisoned for six years after Gregory took the stand yesterday to explain why he entered a Silver Spring bank on Feb. 9, 1977, with two rifles and took the hostages.

Gregory recalled that on April 11, 1969 he watched his best friend's body virtually disintegrate as it was struck by shells during an attack on his Marine company in the Quangnam province of Vietnam. The four-times decorated Marine was himself hit in the head by shrapnel, but he nevertheless moved out into the combat zone to recover his dead friend's body.

"I never felt like myself again," Gregory said.

This experience was mingled in his mind with other Vietnam battles as he took the hostages in the bank and held them for six hours, according to Gregory and a psychologist and psychiatrist who testified today in his behalf.

The Gregory case has received the attention of several veterans groups, nationally known psychologists and psychiatrists as well as the Vietnam Veterans in Congress, a group headed by Rep. David Bonoir (D-Mich.) who attended the Gregory hearing yesterday. These groups believe that the Vietnam veterans suffer special problems of stress that can lead to incidents like that at the bank.

Steve Champlin of the Council of Vietnam Veterans called Mitchell's decision significant because it shows that the courts are beginning to recognize that "the solution is not incarceration."

Champlin said the fact that a representative of the Veterans Administration testified in Gregory's behalf is a sign that the government -- and the country -- are now willing to deal with those problems.

According to the testimony of Dr. John P. Wilson of Cleveland, many Vietnam veterans suffer peculiar psychological problems stemming from a war reaction that has been delayed because thay felt inhibited about talking about the war when they returned home.

In other wars, "soldiers came back en masse and were heroes. The society was committed to their war.... That wasn't the case with Vietnam. And when those veterans tried to talk about it, people turned them off," Wilson said.

Gregory, a frail-looking boyishfaced ex-Marine corporal, recalled on the witness stand how, when he returned to California from Vietnam in 1969, people were protesting the war in the streets and he felt people were staring at him and snickering because of his uniform.

"I felt lost... I really didn't want to go home," he said.

When he returned home to Silver Spring, he felt everybody in his family wanted to "brush off" his time in Vietnam. "When I think about it now, I think I was kind of an embarrassment," he said in a direct, deliberate voice.

When he entered the bank, Gregory was once again attempting to commit suicide, according to the testimony yesterday of Dr. Stephen Sonnenberg from the Howard University School of Medicine and Psychiatry.

Sonnenberg said that suicidal and guilt feelings are common among individuals who have witnessed a great deal of death and destruction, but survived it. He said Gregory was suffering from just such a "survival syndrome."

Sonnenberg testified that Gregory had a history of running away from home as a youth and had personality problems before he went to Vietnam. But his disturbed childhood, Sonnenberg said, merely "predisposed" Gregory to the survival syndrome and it was the traumatic events he witnessed in Vietnam that led to his violent, hostile acts following his return.

The incident at the Citizens Bank and Turst Co, of Silver Spring came during the eight-year period after his return from Vietnam that was marked by marital, parental and employment problems. He was charged with a series of offenses during this time ranging from assaulting a man who called him "soldier boy" to breaking into a hotel in Ocean City. He tried committing suicide three times.

Sonnenberg said it is common for persons suffering from the survival syndrome to want to relive the trauma they once experienced to try to "undo it, make it right."

He said that in the bank, Gregory viewed his hostages as members of his squad.

Wilson noted that Gregory seemed to be fulfilling some sort of death wish at the bank. He showed up attired in a suit and cufflinks and was carrying his war ribbons in his pocket, Wilson said.

In the bank, Gregory fired about 250 rounds of ammunition into the walls and ceiling. He twice put his rifle to the head of a female employe of the bank and then, just before pulling the trigger, fired at the wall, according to Deputy State's Attorney Timothy Clarke.

Gregory also threatened to shoot anyone who came near the bank. He eventually released all the hostages unharmed and gave himself up to police.

Gregory said that in taking the hostages he was merely trying to show that he needed help. He said that several times while he was in the bank he did not know what he was doing or else he felt "I was in the Nam."

He said he often fantasizes about how he might have done things differently while he was in Vietnam and that he frequently has flashbacks of his experiences.

He would often associate his supervisors at work, he said, with commanding officers he had known in Vietnam. But "it didn't have to be a person (to cause a flashback)... It could be a wall that would take me back and I'd relive it all... It can just be the tone of somebody's voice."

Both Wilson and Sonnenberg recommended that the judge made it possible for Gregory to be in a hospital, instead of a prison. He needed to be in group therapy with other veterans, they said.

Gregory was convicted at a trial last year in connection with the bank incident and was sentenced to serve 16 years. But that conviction was overturned on appeal. Faced with a second trial, Gregory then pleaded guilty to the same charges. The prosecutors agreed in return to recommend a sentence of only six years.