Virginia's top legal officer argued before the U.S. Supreme Court yesterday that judges have the right to conduct entire criminal trials in secret under certain circumstances.

The press and public have no constitutional right to attend a criminal trial if the defendant, judge and prosecutor agree to close the proceeding, Virginia Attorney General J. Marshall Coleman declared.

He made his argument in a controversial case involving a Virginia judge who in 1978 closed a murder trial to the public and barred two Richmond reporters from covering the courtroom proceedings. Coleman was sharply questioned during his presentation by Chief Justice Warren E. Burger and Justices Byron R. White and Harry Blackmun.

Last July the Virginia Supreme Court rejected an appeal by Richmond Newspapers Inc. and upheld the right of Hanover County Circuit Court Judge Richard H. C. Taylor to close the two-day trial of a Baltimore man, John Paul Stevenson, accused of murdering a local motel manager.

The Virginia court cited the Supreme Court's decision, handed down a week earlier in the case of Gannett vs. DePasquale that said the public and media can be legally barred from a pretrial hearing on whether to suppress certain evidence.

The Gannett decision has been the subject of widespread debate in legal circles and great concern in press and civil liberties groups. In the last seven months, according to the Reporters Committee for the Freedom of the Press, there have been 185 attempts -- nearly half of them successful -- to close various criminal proceedings.

In some cases judges have closed entire trials and sentencings, in others the press but not in public has been barred from courtrooms. The Supreme Court's action in the Richmond case is being watched closely because it is regarded as a way of clarifying the Gannett opinion.

More than 56 newspapers, including The Washington Post, the three major television networks and the American Civil Liberties Union have filed briefs in support of the Richmond Newspapers argument.

Coleman appeared cool and unruffled as he delivered his 35-minute arguments and fielded the justices' frequent questions before a courtroom packed with lawyers, reporters and spectators.

He said that closing the trial at the defense attorney's request was essential to the defendant's right to a fair trial in the case in question despite a Virginia tradition of open courts "that exists and is viable as long as I'm attorney general."

"In this instance," he argued, "you are confronted with a very limited case that ought not to be reversed because the judge, on the firing line, was making a decision."

His left hand shoved into the pants pocket of his navy pin-stripe, three-piece suit, his right hand gesturing for emphasis, Coleman said the First Amendment does not guarantee the press or public the right of access "to governmental places and information."

The closed, two day trial, which resulted in Stevenson's acquittal, was his fourth, Coleman reminded the justices. The reason Stevenson was acquitted is not known, but his first trial resulted in a conviction -- later nullified because of inadmissible evidence -- and two other procedings ended in mistrials.

Harvard University law professor Laurence H. Tribe, representing the Richmond newspapers, rejected Coleman's contention that the trial had been closed to ensure Stevenson a fair trial and to prevent witnesses from discussing the proceding with courtroom spectators.

"Tensions between publicity and fairness cease when a trial begins," said Tribe, who added that the judge failed to consider moving the trial or sequestering the jury.

Government action making a trial secret, Tribe argued, is a form of censorship an the public's right to observe trials is "constitutionally protected because it is indispensable to public confidence in the legal system."

The Gannett decision, Tribe continued, involved only a pretrial hearing on whether evidence sould be suppressed, rather than actual trials themselves.

"Ultimately the purposes of a pretrial suppression hearing . . . contrast with the purpose of a trial itself," Tribe said. The former resembles an "internal government proceeding" while a trial is public by its very nature and the Richmond case violates the Sixth Amendment right to a public trial, he argued.

When Justice John Paul Stevens pointedly asked whether the First Amendment right means that the court must overturn the Gannett decision if it decides in favor of the Richmond newspapers, Tribe said no that the court could distinguish between pretrial suppression hearings and actual trials.

"I don't think a constitutional ruling with the inflexibility of that is what's needed here," countered Coleman, who said he thought the problem of closing trails could be remedied through local court decision and legislation.

Coleman, a Republican who is expected to be his party's nominee for governor next year, recently proposed new state legislation that would require most trials to be open. His legislation, however, contained provisions that would allow judges permission to close trials under several conditions including the possibility that the trial might generate publicity prejudicial to a criminal defendant.

"I'm all for open trials," said Coleman as he left the court after his appearance yesterday. "I would not like to see closed trials in Virginia and I don't think we'll see them. I've proposed legislation to deal with that."