
232 S.E.2d 741 (1977)
Ralph Randolph JOHNSON
v.
COMMONWEALTH of Virginia.
Record No. 760186.
Supreme Court of Virginia.
March 4, 1977.
Robert P. Geary, Highland Springs (Reid A. Simmons, Richmond, on brief), for plaintiff in error.
Patrick A. O'Hare, Asst. Atty. Gen. (Andrew P. Miller, Atty. Gen., on brief), for defendant in error.
Before I'ANSON, C. J., and CARRICO, HARRISON, COCHRAN, HARMAN, POFF and COMPTON, JJ.
PER CURIAM.
Ralph Randolph Johnson was found guilty by a jury of robbery committed August 4, 1975 and, by final order entered October 21, 1975, was sentenced to confinement in the penitentiary for five years. After the jury had been sworn, Johnson moved to exclude all witnesses. The trial court excluded all witnesses except the investigating officer. We granted Johnson a writ of error to consider the effect of an amendment to Code § 8-211.1 adopted by the General Assembly effective June 1, 1975. Acts 1975, c. 652.
Prior to amendment, the statute read in part:
"In the trial of every case, civil or criminal, the court . . . may upon its own motion and shall upon the motion *742 of any party, require the exclusion of every witness whose presence is not necessary to the proceedings. . . ." (Italics supplied).
The 1975 amendment deleted the italicized language. Addressing that language in Jefferson v. Commonwealth, 212 Va. 255, 183 S.E.2d 734 (1971), we declined to speculate upon legislative intent and held that the statute did not vest a defendant with an absolute right to exclusion of all witnesses. In accord, we ruled in Yorke v. Commonwealth, 212 Va. 776, 188 S.E.2d 77 (1972), Evans v. Commonwealth, 215 Va. 609, 212 S.E.2d 268 (1975), and Hensley v. City of Norfolk, 216 Va. 369, 218 S.E.2d 735 (1975), that exclusion of witnesses was a matter within the sound discretion of the trial court. In all these cases, the trial date antedated the effective date of the 1975 amendment. Here, the amendment was in effect on the day of trial.
Johnson argues that while a defendant's right to exclusion under the old statute was qualified, i.e., it extended only to those witnesses whose presence at trial was not necessary, the amendment removed that qualification and made a defendant's right absolute. We agree. In its amended form, Code § 8-211.1 permits of no rational construction but that "upon the motion of any party" a trial court "shall" exclude "every witness" during the trial of "every case, civil or criminal".
The Commonwealth contends that this construction is defeated by the language of Code § 19.2-266 (Repl. Vol. 1975) which reads in part:
"In the trial of all criminal cases . . the court may, in its discretion, exclude from the trial any persons whose presence would impair the conduct of a fair trial . . . ."
Although the word "persons" may include witnesses, we read that statute (previously, Code § 19.1-246 (Cum.Supp. 1975)) to apply primarily to spectators. Legislative history supports our view. Code § 19.2-266 and the 1975 amendment to Code § 8-211.1 were adopted at the same session of the legislature. We cannot assume that the General Assembly intended to enact two contradictory statutes. Rather, we conclude that it intended the two statutes to serve different functions in furtherance of a common goal, viz., a fair trial for all litigants.
The judgment will be reversed and the case will be remanded for a new trial.
Reversed and remanded.
