Virginia Attorney General J. Marshall Coleman condemned as a "scandal" yesterday a highly unusual out-of-court banishment agreement that requires that a mentally ill Vietnam veteran stay out of the state or face jail.

Coleman said he planned to investigate the agreement between a central Virginia prosector and a defense attorney that prevents Thomas Edward Bruce, 28, whom the Army discharged as "100 percent disabled" because of war-related mental disorders, from returning to his rural hometown near Charlottesville.

"Banishment is a form of punishment more primitive than torture." Coleman said, quoting a Supreme Court decision. "You don't just cast these problems off to another state. You either punish him or treat him."

Bruce, who is living in a small Northwest Washington apartment, enlisted in the Army in 1969 and returned home in a restraining garment after one year in Vietnam. Last year he shot a Virginia grocery store owner twice in the stomach with a .22-caliber pistol after the man refused to give him $2. The owner recovered from the shots.

Bruce was convicted of malicious wounding and given a suspended 10-year prison sentence. He was released on probation and was arrested this year on a murder charge.

The murder charge against Bruce was dismissed last week for lack of evidence about a month after his defense lawyer, an Albemarle County prosecutor and a probation officer reached an agreement - which Bruce signed - that keeps Bruce out of Virginia as a condition of his release from jail. The agreement, however, did not become public until this week.

"The whole thing was done for the good of Thomas Bruce," Bruce's lawyer, J. T. Camblos, said yesterday. He said his client understood what he signed and that "we have all agreed he's agreed he's better off away from here."

But Bruce's mother said her son called her from Washington yesterday and said he wanted to come home this weekend. She said that her son had not understood that he is not allowed to return under the agreement.

Coleman said the agreement is unenforceable because it violates the Constitution's ban on cruel and unusual punishment.

"The idea of a man without a country has already been ruled on (and rejected) by the Supreme Court," Coleman said. He said that Bruce has grounds for bringing a suit against the state for violating his constitutional rights.

Bruce, who could not be reached yesterday, lives in an efficiency apartment. "Basically he just stays in and watches television," said Joe Thomas, a friend from Bruce's hometown of Esmont. "He's in a strange city, and he needs help."

Sterling Proffitt, the Charlottesville probation officer who signed the Banishment agreement, said yesterday that Bruce "would have been free to leave jail" without signing the agreement. Proffitt said "no pressure" was placed on Bruce to sign the document.

Residents of Esmont were upset over the murder and their sentiments were factors in Proffitt's decision to sign the agreement, he said.

Proffitt said the country sheriff had received calls from the area residents who said they were scared of Bruce. Other residents threatened to kill Bruce if he returns to the area, Proffitt said.

Friends and relatives of Bruce said yesterday he retured from Vietnam, torn by mental problems and subject to fits of "nerves" and temper.

After returning from Vietnam, Bruce was taken to Walter Reed Hospital, where he supposedly was treated with powerful behavior-modification drugs - "the kind of drugs with which you could deactivate a volcano," said probation officer Proffitt.

He was released from the hospital in 1970 and returned to Esmont where his mother said he tried to adjust to civilian life while living on his government disability checks.

Bruce often sat for hours in his car outside the grocery store, where he later shot the owner, greeting passersby, according to Lillian Coltraine, his mother.

Albermarle County Circuit Court Judge David F. Berry, who has handled the Bruce case, told reporters yesterday that he had no knowledge of the banishment agreement. But probation officer Proffitt said he told the judge about it May 2.

Reacting angrily to reports of the banishment agreement, Coleman said yesterday Virginia should care for its own residents.

"If we start kicking people out of Virginia, then Maryland or the District will start kicking people out and sending them to Virginia," he said.