McCann and a codefendant (hereafter Margaret), who was living at McCann’s Charlestown apartment at the time of the events discussed below, were indicted for being accessories after an armed robbery. Luke Janusz, armed with a sawed-off shotgun, had robbed of some drugs a drugstore in Waltham on December 31, 1983, about 7 p.m. During the robbery Janusz was shot three times. After the robbery, Janusz (and Kim, his “girlfriend” who had accompanied him to Waltham in his automobile) went to McCann’s apartment. There Margaret answered the door. Janusz, Kim, and McCann entered McCann’s bedroom. Margaret had a cast on her leg and remained outside the bedroom throughout the evening. McCann in the bedroom was informed of the robbery and participated in efforts to remove bullets from Janusz’s body.
*954At the trial of McCann and Margaret, the trial judge, after the Commonwealth rested, allowed Margaret’s motion for a required finding of not guilty but instructed defense counsel and Margaret to remain in court because he wanted to finish “taking the evidence . . . today and it would confuse the jury if you get up and go out.” Counsel for Margaret acquiesced in this. Immediately thereafter McCann’s counsel rested, and the jury were released for the day. The judge then discussed briefly with both defense counsel how to inform the jury that they would “not have to consider the matter of” Margaret.
On the following morning, Margaret (although discharged as a defendant) appeared in the spectators’ section of the courtroom. The prosecutor brought this circumstance to the attention of the judge saying that he thought her presence would prejudice the Commonwealth’s case. Asked whether he objected to her absence, McCann’s counsel replied, “The two of them had a trial together. She’s here for moral support. I don’t see why she should be excluded from the courtroom. The evidence is over.” When the judge inquired what he should tell the jury if Margaret continued to be present, McCann’s attorney replied, “Her case has been disposed of and they are not to speculate on any reasons or guesses — what the result may have been. And there is no opinion from the bench on the case that is going forward.” The prosecutor, when asked what should be said if Margaret in fact was not present, suggested, “[Tjhey are not to consider her part of the case any more, and they are not to speculate why — end of discussion.” The judge then ruled, “[Ojn balance . . . it’s appropriate that she not be here. She can come after the arguments and charge. I don’t want her here if the jury should come in with a question. She may come when the jury comes in with a verdict.” No objection to this order was made (except as outlined above) and no showing has been advanced that it was likely to cause any miscarriage of justice or any actual prejudice.
After the jury came in that morning, the judge immediately instmcted them, “The case involving . . . [the codefendant] has been separated from this one and I tell you — indeed, I instruct you — that you are not to speculate on why or as to what has happened. Dismiss it from your mind. You have plenty to think about with respect to this case involving Mr. McCann.”
1. McCann’s counsel argues that Margaret was excluded “solely for the convenience of the Commonwealth” lest “the jury ... be influenced by her presence in some unspecified way unfavorable to the Commonwealth.” The judge obviously recognized (both when he granted Margaret’s motion for a required finding and on the following morning) that the jury would be perplexed by the nonappearance of Margaret as a codefendant. He wanted to avoid as fully as possible any confusion or speculation which might arise in their minds and direct their complete attention upon the only issue remaining before them — the guilt or innocence of McCann.
The judge reasonably could have determined that Margaret’s unexplained presence as a spectator would have been inconsistent with the judge’s wholly *955proper purpose. What the effect of such jury speculation would have been on the remaining party, of course, was unpredictable. The limited exclusion was within the trial judge’s discretion to assure a fair trial, similar to that relating to the sequestration of witnesses. See authorities cited in Smith, Criminal Practice and Procedure §§ 1751-1759 (2d ed. 1983 & Supp. 1986).
Carol A. Donovan, Committee for Public Counsel Services, for the defendant. Max W. Beck, Assistant District Attorney, for the Commonwealth.It is far from clear from this record that McCann’s counsel really made a persistent objection to the judge’s action. In any event we hold that action to have been within his discretion.
2. No order has been brought to our attention excluding from the courtroom any person other than Margaret. So far as appears, there was no violation of the principle that criminal trials in general must be open to the press, other media, and the public. There was no general exclusion of all relatives and friends, of the type considered in Commonwealth v. Marshall, 356 Mass. 432, 435 (1969), but only of one person whose presence (because she had been a codefendant) might affect the jury. The present facts were carefully considered and restricted to the necessities of the situation by a judge who had observed the defendants during the taking of evidence. Thus we need not consider issues raised by more general exclusions of the public from the whole (or segments) of criminal trials such as those discussed in recent decisions of the Supreme Court of the United States. See, e.g., Richmond Newspapers, Inc. v. Virginia, 448 U.S. 555 (1980); Globe Newspaper Co. v. Superior Court, 457 U.S. 596 (1982); Waller v. Georgia, 467 U.S. 39 (1984). See Commonwealths. Stetson, 384 Mass. 545,549-551 (1981), and cases there cited. See also Commonwealth v. Hobbs, 385 Mass. 863, 865-869 (1982).
Judgment affirmed.